KCNA Cloud Native Patterns 4 — Questions and Answers
Question 1: What is the Ambassador pattern in cloud native architectures?
- A sidecar that proxies network traffic on behalf of the main container (Correct answer)
- A gateway that translates protocols between internal and external services
- A container that initializes configuration before the main app starts
- A pattern that mirrors production traffic to a staging environment
Correct answer: A sidecar that proxies network traffic on behalf of the main container
The Ambassador pattern uses a sidecar proxy to handle outbound network concerns like retries, TLS, and service discovery on behalf of the main container.
Question 2: Which pattern involves running a container that completes setup tasks before the main application container starts?
- Init Container (Correct answer)
- Sidecar
- Adapter
- Ambassador
Correct answer: Init Container
Init Containers run to completion before the main containers start, making them ideal for setup tasks like schema migrations or config fetching.
Question 3: In a service mesh, what component typically handles communication between services at the data plane level?
- Sidecar proxy (e.g., Envoy) (Correct answer)
- Ingress controller
- CoreDNS
- etcd
Correct answer: Sidecar proxy (e.g., Envoy)
Service meshes use sidecar proxies like Envoy injected alongside each service to intercept and manage all inter-service communication.
Question 4: What is eventual consistency in the context of distributed cloud native systems?
- Data will become consistent across nodes given enough time without new updates (Correct answer)
- All nodes always have identical data at any given moment
- Writes are rejected until all replicas acknowledge them
- Only the leader node can serve reads
Correct answer: Data will become consistent across nodes given enough time without new updates
Eventual consistency guarantees that, if no new updates occur, all replicas will converge to the same value over time.
Question 5: Which cloud native pattern helps external clients communicate with services that use incompatible internal protocols?
- Adapter (Correct answer)
- Sidecar
- Strangler Fig
- Bulkhead
Correct answer: Adapter
The Adapter pattern wraps a service to translate its interface so external clients can communicate with it using a compatible protocol.
Question 6: What is the purpose of a health endpoint in cloud native applications?
- Allows orchestrators to check if the application is ready or alive (Correct answer)
- Exposes application metrics to monitoring systems
- Provides audit logs for security analysis
- Manages configuration hot-reloading
Correct answer: Allows orchestrators to check if the application is ready or alive
Health endpoints (liveness and readiness probes) let orchestrators like Kubernetes determine whether a container should receive traffic or be restarted.
Question 7: In cloud native design, what does 'design for failure' mean?
- Assume components will fail and build systems that handle failure gracefully (Correct answer)
- Test applications by intentionally introducing failures in production
- Deploy redundant infrastructure in all regions by default
- Use chaos engineering tools to stress-test all services before launch
Correct answer: Assume components will fail and build systems that handle failure gracefully
Designing for failure means building systems that expect and tolerate component failures through patterns like retries, circuit breakers, and graceful degradation.
What is the Ambassador pattern in cloud native architectures?