Bird
Raised Fist0
GCPcloud~20 mins

Cloud CDN integration in GCP - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Cloud CDN Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Architecture
intermediate
2:00remaining
Designing a scalable Cloud CDN setup for a global website

You need to design a Cloud CDN integration for a website that serves users worldwide. Which architecture best ensures low latency and high availability?

AUse Cloud CDN directly without a load balancer, pointing to backend VMs in one region.
BDeploy multiple backend instance groups in multiple regions behind a global HTTP(S) Load Balancer with Cloud CDN enabled.
CUse a single backend instance group in one region with Cloud CDN enabled.
DDeploy backend instance groups in multiple zones within one region and enable Cloud CDN on each.
Attempts:
2 left
💡 Hint

Think about how Google Cloud distributes traffic globally and caches content close to users.

❓ scaling
intermediate
2:00remaining
Estimating cache hit ratio impact on backend load

Your Cloud CDN cache hit ratio improves from 60% to 90%. How does this affect the backend server load?

ABackend load decreases by 90% because all requests are served from cache.
BBackend load increases by 30% due to more cache misses.
CBackend load remains the same because cache hit ratio does not affect origin traffic.
DBackend load decreases by 30% because fewer requests reach the origin.
Attempts:
2 left
💡 Hint

Cache hit ratio means the percentage of requests served by the CDN cache instead of the backend.

❓ tradeoff
advanced
2:00remaining
Choosing between Cloud CDN and Cloud Storage for static content delivery

You have static assets stored in Cloud Storage. You want to serve them globally with low latency. What is the main tradeoff when enabling Cloud CDN in front of Cloud Storage?

ACloud CDN adds caching and reduces latency but increases cost due to cache egress charges.
BCloud CDN reduces cost but increases latency because it bypasses edge locations.
CCloud CDN disables caching and serves content directly from Cloud Storage, increasing latency.
DCloud CDN automatically compresses content but does not cache it, so no latency benefit.
Attempts:
2 left
💡 Hint

Consider how caching affects cost and performance.

🧠 Conceptual
advanced
2:00remaining
Understanding cache invalidation in Cloud CDN

After updating your website content, you want Cloud CDN to serve the new version immediately. Which method correctly invalidates cached content?

AUse the Cloud CDN cache invalidation API to specify URLs to purge from cache.
BWait for the cache TTL to expire; no manual invalidation is possible.
CDelete the backend instance group to clear the cache.
DDisable and re-enable Cloud CDN on the backend service.
Attempts:
2 left
💡 Hint

Think about how to remove specific cached content without downtime.

❓ estimation
expert
3:00remaining
Estimating required cache capacity for a high-traffic website

Your website receives 10 million requests per day. Average response size is 500 KB. You expect a 75% cache hit ratio. Estimate the daily data served from Cloud CDN cache edges.

AApproximately 10 TB per day served from cache edges.
BApproximately 5 TB per day served from cache edges.
CApproximately 3.75 TB per day served from cache edges.
DApproximately 1.25 TB per day served from cache edges.
Attempts:
2 left
💡 Hint

Calculate total data, then multiply by cache hit ratio.

Practice

(1/5)
1. What is the primary purpose of Google Cloud CDN in a web application architecture?
easy
A. To cache content closer to users for faster delivery
B. To store user data securely in the cloud
C. To manage database connections efficiently
D. To provide virtual machines for computation

Solution

  1. Step 1: Understand Cloud CDN's role

    Cloud CDN caches static and dynamic content at edge locations near users to reduce latency.
  2. Step 2: Compare with other options

    Options A, B, and D describe other cloud services unrelated to CDN's caching function.
  3. Final Answer:

    To cache content closer to users for faster delivery -> Option A
  4. Quick Check:

    Cloud CDN = caching content near users [OK]
Hint: Cloud CDN speeds up content by caching near users [OK]
Common Mistakes:
  • Confusing CDN with storage or compute services
  • Thinking CDN manages databases
  • Assuming CDN is for security only
2. Which GCP component must be configured to enable Cloud CDN for a backend service?
easy
A. Create a Cloud Storage bucket
B. Set up a Cloud SQL instance
C. Enable CDN on the backend service
D. Configure a Pub/Sub topic

Solution

  1. Step 1: Identify CDN enabling step

    Cloud CDN is enabled by turning on the CDN option on the backend service linked to the load balancer.
  2. Step 2: Eliminate unrelated components

    Cloud Storage buckets, Cloud SQL, and Pub/Sub are unrelated to enabling CDN on backend services.
  3. Final Answer:

    Enable CDN on the backend service -> Option C
  4. Quick Check:

    Enable CDN = backend service setting [OK]
Hint: Enable CDN directly on backend service in GCP [OK]
Common Mistakes:
  • Trying to enable CDN on storage buckets only
  • Confusing CDN with database or messaging setup
  • Missing the backend service step
3. Given this simplified request flow for Cloud CDN: User -> HTTP(S) Load Balancer -> Backend Service (CDN enabled) -> Origin Server. What happens when a user requests a cached object that is still valid in the CDN cache?
medium
A. The load balancer fetches the object from the origin server
B. The CDN serves the cached object directly to the user
C. The backend service disables caching for that request
D. The request is redirected to another region

Solution

  1. Step 1: Understand CDN cache hit behavior

    If the requested object is cached and valid, Cloud CDN serves it directly from the cache without contacting the origin.
  2. Step 2: Analyze other options

    The load balancer fetches the object from the origin server is incorrect because the origin is bypassed on cache hit; options B and C do not describe CDN cache behavior.
  3. Final Answer:

    The CDN serves the cached object directly to the user -> Option B
  4. Quick Check:

    Cache hit = CDN serves cached content [OK]
Hint: Cache hit means CDN serves content, no origin call [OK]
Common Mistakes:
  • Assuming origin is always contacted
  • Confusing backend service disabling cache
  • Thinking request redirects on cache hit
4. You configured Cloud CDN but notice that content is not being cached. Which of the following is the most likely misconfiguration?
medium
A. CDN is not enabled on the backend service
B. The load balancer is using HTTP instead of HTTPS
C. The origin server is unreachable
D. The forwarding rule is missing a static IP

Solution

  1. Step 1: Check CDN enablement

    Cloud CDN must be explicitly enabled on the backend service to cache content.
  2. Step 2: Evaluate other options

    Using HTTP vs HTTPS or missing static IP does not prevent caching; origin unreachable causes errors but not silent no-cache.
  3. Final Answer:

    CDN is not enabled on the backend service -> Option A
  4. Quick Check:

    CDN enabled on backend = caching works [OK]
Hint: Always enable CDN on backend service to cache content [OK]
Common Mistakes:
  • Assuming HTTPS is required for caching
  • Thinking static IP affects caching
  • Ignoring backend service CDN setting
5. You want to design a scalable web app using Cloud CDN to serve static assets from a Cloud Storage bucket. Which setup correctly integrates Cloud CDN for this use case?
hard
A. Configure a forwarding rule to Cloud Storage and enable CDN there
B. Directly enable CDN on the Cloud Storage bucket without a load balancer
C. Use Cloud SQL as backend and enable CDN on it
D. Create a backend bucket pointing to Cloud Storage, enable CDN on it, then configure an HTTP(S) load balancer with this backend bucket

Solution

  1. Step 1: Understand Cloud CDN integration with storage

    Cloud CDN integrates with Cloud Storage via a backend bucket configured in an HTTP(S) load balancer.
  2. Step 2: Evaluate options

    Directly enable CDN on the Cloud Storage bucket without a load balancer is invalid because CDN cannot be enabled directly on storage buckets; C and D misuse services or configurations.
  3. Final Answer:

    Create a backend bucket pointing to Cloud Storage, enable CDN on it, then configure an HTTP(S) load balancer with this backend bucket -> Option D
  4. Quick Check:

    Backend bucket + load balancer + CDN = correct setup [OK]
Hint: Use backend bucket with load balancer to enable CDN on storage [OK]
Common Mistakes:
  • Trying to enable CDN directly on storage buckets
  • Using databases as backend for CDN
  • Misconfiguring forwarding rules without load balancer
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard