Question 1mediummultiple choice
Read the full Optimizing service performance explanation →PCDOE Optimizing service performance • Complete Question Bank
Complete PCDOE Optimizing service performance question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
---
# Sample error from Cloud Logging
{
"httpRequest": {
"requestUrl": "https://example.com/data",
"status": 504
},
"resource": {
"type": "gae_app",
"labels": {
"module_id": "default",
"version_id": "v2"
}
},
"textPayload": "The request was terminated because it took longer than 60 seconds."
}
---Refer to the exhibit.
---
# gcloud logging read output (partial)
insertId: abc123
resource: {
type: "k8s_container"
labels: {
cluster_name: "prod-cluster"
namespace_name: "payment"
pod_name: "payment-svc-7df4b9c6f8-5k9j2"
container_name: "payment"
}
}
textPayload: "E0111 12:34:56.789012 123 main.go:45] rpc error: code = Unavailable desc = connection closed"
severity: ERROR
---Refer to the exhibit.
Cloud Monitoring alert policy (YAML):
```yaml
alertPolicy:
displayName: 'High CPU Utilization'
combiner: OR
conditions:
- displayName: 'CPU utilization > 80% for 5 min'
conditionThreshold:
filter: 'metric.type="kubernetes.io/container/cpu/usage_time" AND resource.type="k8s_container" AND resource.labels.cluster_name="prod-cluster"'
aggregations:
- alignmentPeriod: 60s
perSeriesAligner: ALIGN_RATE
- crossSeriesReducer: REDUCE_SUM
groupByFields:
- resource.label.namespace_name
- resource.label.container_name
- conditionThreshold:
thresholdValue: 0.8
duration: 300s
comparison: COMPARISON_GT
notificationChannels:
- 'projects/my-project/notificationChannels/12345'
```Refer to the exhibit.
```
$ gcloud compute instances describe instance-1 --zone=us-central1-a
...
networkInterfaces:
- accessConfigs:
- name: external-nat
natIP: 34.123.45.67
type: ONE_TO_ONE_NAT
name: nic0
network: https://www.googleapis.com/compute/v1/projects/my-project/global/networks/default
subnetwork: https://www.googleapis.com/compute/v1/projects/my-project/regions/us-central1/subnetworks/default
...
disks:
- autoDelete: true
boot: true
deviceName: instance-1
diskSizeGb: '100'
interface: SCSI
source: https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/disks/instance-1
type: PERSISTENT
...
serviceAccounts:
- email: 123456789-compute@developer.gserviceaccount.com
scopes:
- https://www.googleapis.com/auth/devstorage.read_only
- https://www.googleapis.com/auth/logging.write
- https://www.googleapis.com/auth/monitoring.write
- https://www.googleapis.com/auth/servicecontrol
- https://www.googleapis.com/auth/service.management.readonly
- https://www.googleapis.com/auth/trace.append
```Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Verify external accessibility of a service
Time taken to respond to a request
Percentage of failed requests
Number of requests processed per second
Degree to which a resource is fully utilized
Command: gcloud compute instances list --format="value(name,zone,cpuPlatform,status)" Output: instance-1 us-central1-a Intel Haswell RUNNING instance-2 us-central1-a Intel Skylake RUNNING instance-3 us-central1-b Intel Broadwell RUNNING
Firewall rule JSON:
{
"name": "deny-high-latency",
"network": "default",
"priority": 1000,
"direction": "INGRESS",
"sourceRanges": ["0.0.0.0/0"],
"allow": [{"protocol": "tcp", "ports": ["80","443"]}],
"deny": [{"protocol": "tcp", "ports": ["80","443"]}],
"logConfig": {"metadata": "INCLUDE_ALL_METADATA"}
}Cloud Monitoring alert policy configuration: Condition type: Metric threshold Resource type: Cloud Run Revision Metric: request_count Condition: Any time series violates Threshold: > 1000 Duration: 1m
{
"textPayload": "ERROR: ENOENT: no such file or directory, open '/app/data/config.txt'",
"resource": {
"type": "k8s_container",
"labels": {
"cluster_name": "prod-cluster",
"namespace_name": "default",
"pod_name": "api-pod-xyz"
}
},
"severity": "ERROR",
"timestamp": "2023-10-01T12:00:00Z"
}NAME ZONE MACHINE_TYPE PREEMPTIBLE instance-1 us-central1-a n1-standard-2 yes instance-2 us-central1-a n1-highcpu-16 no instance-3 us-central1-b n1-highmem-8 no
httpRequest: {
requestMethod: "POST"
requestUrl: "https://example.com/api/orders"
status: 200
responseSize: "4521"
latency: "2.345s"
remoteIp: "203.0.113.100"
cacheHit: false
}
httpRequest: {
requestMethod: "POST"
requestUrl: "https://example.com/api/orders"
status: 200
responseSize: "4521"
latency: "0.012s"
remoteIp: "203.0.113.101"
cacheHit: true
}kubectl describe node gke-cluster-default-pool-12345678-ab ... Capacity: cpu: 8 memory: 32768Mi ephemeral-storage: 100Gi Allocatable: cpu: 7 memory: 30720Mi ephemeral-storage: 90Gi ... Conditions: Type Status Message ---- ------ ------- MemoryPressure True Node is experiencing memory pressure DiskPressure False PIDPressure False Ready True ...
Function CPU Time (ms) % getCustomerData() 1200 60% processOrder() 400 20% saveToDatabase() 300 15% other 100 5% Total 2000
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS instance-1 us-central1-c n1-standard-2 false 10.128.0.2 34.67.89.100 RUNNING instance-2 us-central1-c n1-highmem-4 false 10.128.0.3 34.67.89.101 RUNNING instance-3 us-central1-c n1-standard-2 true 10.128.0.4 34.67.89.102 RUNNING