0
0
GCPcloud~10 mins

Concurrency and scaling in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the instance class in a Google App Engine service.

GCP
instance_class: [1]
Drag options to blanks, or click blank then click option'
Aauto
Bmanual
Cstandard
DF2
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'standard' which is a service environment, not an instance class.
Using 'auto' or 'manual' which are scaling types, not instance classes.
2fill in blank
medium

Complete the code to set automatic scaling in App Engine.

GCP
automatic_scaling:
  max_instances: [1]
Drag options to blanks, or click blank then click option'
A10
B5
C0
Dunlimited
Attempts:
3 left
💡 Hint
Common Mistakes
Setting max_instances to 0 disables instances, causing errors.
Using 'unlimited' is not a valid numeric value.
3fill in blank
hard

Fix the error in the Cloud Run service configuration to allow concurrency of 80 requests per instance.

GCP
concurrency: [1]
Drag options to blanks, or click blank then click option'
A80
B1
C1000
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Setting concurrency to 0 disables concurrency, causing errors.
Using 1 disables concurrency, allowing only one request at a time.
4fill in blank
hard

Fill both blanks to configure App Engine to use manual scaling with 3 instances.

GCP
manual_scaling:
  instances: [1]
env: [2]
Drag options to blanks, or click blank then click option'
A3
Bstandard
Cflexible
Dauto
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'auto' environment which is not valid.
Setting instances to a non-integer value.
5fill in blank
hard

Fill all three blanks to create a Cloud Run service with max instances 5, concurrency 10, and CPU always allocated.

GCP
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: my-service
spec:
  template:
    spec:
      containerConcurrency: [1]
      container:
        image: gcr.io/my-project/my-image
        resources:
          limits:
            cpu: 1
        env:
          - name: CPU_ALWAYS_ON
            value: "[2]"
      maxScale: [3]
Drag options to blanks, or click blank then click option'
A5
Btrue
C10
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up concurrency and maxScale values.
Using 'false' for CPU_ALWAYS_ON disables always-on CPU.