Topic 1 Question 140
Your company has a Kubernetes application that pulls messages from Pub/Sub and stores them in Filestore. Because the application is simple, it was deployed as a single pod. The infrastructure team has analyzed Pub/Sub metrics and discovered that the application cannot process the messages in real time. Most of them wait for minutes before being processed. You need to scale the elaboration process that is I/O-intensive. What should you do?
Use kubectl autoscale deployment APP_NAME --max 6 --min 2 --cpu-percent 50 to configure Kubernetes autoscaling deployment.
Configure a Kubernetes autoscaling deployment based on the subscription/push_request_latencies metric.
Use the --enable-autoscaling flag when you create the Kubernetes cluster.
Configure a Kubernetes autoscaling deployment based on the subscription/num_undelivered_messages metric.
ユーザの投票
コメント(17)
Answer is D. num_undelivered_messages metric can indicate if subscribers are keeping up with message submissions. https://cloud.google.com/pubsub/docs/monitoring#monitoring_the_backlog
👍 33Rzla2021/09/04- 正解だと思う選択肢: D
Direct answer - D
https://cloud.google.com/kubernetes-engine/docs/samples/container-pubsub-horizontal-pod-autoscaler
apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: pubsub spec: minReplicas: 1 maxReplicas: 5 metrics:
- external: metric: name: pubsub.googleapis.com|subscription|num_undelivered_messages selector: matchLabels: resource.labels.subscription_id: echo-read target: type: AverageValue averageValue: 2 type: External scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: pubsub
👍 11aut0pil0t2022/09/02 - 👍 5pddddd2022/01/10
シャッフルモード