Cross-cutting Concepts Flashcards
7 cards from real CPSA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Cross-cutting Concepts flashcards as text
Which pattern provides a single, reusable implementation of a cross-cutting concern (e.g., retry logic) that is injected into multiple services without code duplication?
Answer: Sidecar / proxy pattern
The sidecar pattern deploys a co-located proxy that transparently handles cross-cutting concerns like retries, mTLS, and circuit breaking for the main service.
In CPSA terms, which quality attribute is directly addressed by implementing a circuit breaker as a cross-cutting mechanism?
Answer: Resilience / fault tolerance
A circuit breaker prevents cascading failures by stopping calls to a failing dependency, directly improving fault tolerance and system resilience.
Which approach best handles idempotency as a cross-cutting concern for HTTP POST endpoints?
Answer: Accepting a client-generated idempotency key and deduplicating on the server
An idempotency key lets the server detect and suppress duplicate requests, ensuring retried POSTs do not create duplicate effects.
A CPSA candidate is reviewing an architecture where transaction boundaries span multiple services. Which cross-cutting pattern manages eventual consistency without distributed locking?
Answer: Saga pattern with compensating transactions
The Saga pattern decomposes a distributed transaction into a sequence of local transactions with compensating actions, achieving eventual consistency without 2PC overhead.
Which cross-cutting technique allows teams to release new features to a subset of users without changing code between deployments?
Answer: Feature toggles (feature flags)
Feature toggles let you switch functionality on or off at runtime for specific user segments without deploying new code.
When securing inter-service communication in a microservices system, which cross-cutting mechanism provides mutual authentication at the transport layer?
Answer: Mutual TLS (mTLS)
mTLS requires both client and server to present certificates, ensuring that only authenticated services can communicate with each other.
Which architectural decision treats caching as a cross-cutting concern rather than embedding cache logic in each service?
Answer: Using a shared caching layer (e.g., Redis) accessed via a common library or proxy
A shared caching layer with a common access abstraction centralizes cache management and prevents duplicated, inconsistent caching logic across services.