← Professional Cloud Developer: applications and production
01 / 7 · 35 MIN

State, caching, and asynchronous flows

Choose execution and state mechanisms according to the required outcome.

Concept and mechanism

A cloud-native application must remain correct when instances change, requests repeat, and dependencies are slow. Distinguish recoverable state from a cache that can be rebuilt. For personalized responses, cache keys must represent authorized scope or the response must stay outside a shared cache.

Authorization remains necessary on a cache hit. Session affinity can improve local reuse but does not guarantee that a client always returns to the same instance. Do not keep the only indispensable state solely in that memory.

Choose runtime by contract and dependencies: a stateless API without Kubernetes controller needs can justify Cloud Run; explicit Kubernetes requirements can justify GKE.

Guided application

In a fictional funds flow, Cloud Tasks can control dispatch and retries for a partner endpoint using idempotent handlers. It neither promises an exact execution time nor eliminates repeated execution. Workflows makes a sequence of calls, decisions, and waits explicit; called services remain responsible for their effects.

For Bigtable telemetry, design row keys around access and distribution. A leading timestamp can concentrate writes even when reversed; a random key can distribute load while making device queries expensive. Compare alternatives using representative data and measure both writing and reading.

In all these examples, managed services remove platform tasks while the team retains business semantics, access boundaries, and success criteria.

IN PRACTICE

A /positions key shared across customers can return another customer’s data even with a very short TTL.

Common pitfalls

Cache as authorization; affinity as persistence; queue as unique execution; randomness as a complete data model.

Related topics: Credentials, secrets, and access · Build, artifacts, and provenance · Tests, emulators, and AI assistance

Take this idea with you

Design state and identity before optimizing execution.

Create account

Reference: Well-Architected Framework · Current linked guide; edition date unconfirmed (2026-09-30 inspection)

Google Cloud is a trademark of Google LLC. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by Google. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.