CPSA Cross-cutting Concepts 2 — Questions and Answers
Question 1: Which cross-cutting concept ensures that all system components record events in a consistent, correlated manner for troubleshooting?
- Distributed tracing (Correct answer)
- Load balancing
- Schema versioning
- Service discovery
Correct answer: Distributed tracing
Distributed tracing correlates log events across services using shared trace IDs, enabling end-to-end troubleshooting in distributed systems.
Question 2: In iSAQB CPSA, which term describes technical concepts that affect multiple components or layers without belonging exclusively to any single one?
- Cross-cutting concerns (Correct answer)
- Domain logic
- Integration patterns
- Deployment strategies
Correct answer: Cross-cutting concerns
Cross-cutting concerns are aspects like logging, security, and caching that span multiple architectural elements and cannot be cleanly encapsulated in one module.
Question 3: A system must validate user roles on every REST endpoint. Which cross-cutting mechanism is most appropriate?
- Middleware or interceptor pipeline (Correct answer)
- Domain model enrichment
- Database stored procedures
- UI form validation
Correct answer: Middleware or interceptor pipeline
Middleware or interceptor pipelines apply cross-cutting logic such as authorization to every request without scattering that logic across individual endpoint handlers.
Question 4: Which strategy best addresses consistency of error responses across all services in a microservices architecture?
- Defining a shared error response schema and enforcing it via an API gateway (Correct answer)
- Letting each service define its own error format
- Using HTTP 200 for all responses and embedding status in the body
- Relying on client-side error normalization only
Correct answer: Defining a shared error response schema and enforcing it via an API gateway
A shared error response schema enforced at the API gateway ensures uniform error handling that clients can rely on regardless of which backend service responded.
Question 5: What is the primary architectural reason for externalizing configuration (e.g., feature flags, connection strings) from application code?
- To allow environment-specific behavior without rebuilding artifacts (Correct answer)
- To improve CPU performance at runtime
- To reduce the number of microservices
- To enable synchronous inter-service communication
Correct answer: To allow environment-specific behavior without rebuilding artifacts
Externalizing configuration decouples deployment artifacts from environment-specific values, enabling the same build to run in dev, staging, and production.
Question 6: Which cross-cutting concept primarily protects against sensitive data being exposed in log files?
- Data masking / log sanitization (Correct answer)
- Symmetric encryption at rest
- Role-based access control
- API rate limiting
Correct answer: Data masking / log sanitization
Data masking or log sanitization strips or obscures PII and secrets before they are written to log sinks, preventing inadvertent exposure.
Question 7: A new service is added to a system. According to CPSA cross-cutting principles, which concern should be addressed at the architecture level before coding begins?
- How the service will emit health metrics and structured logs (Correct answer)
- Which IDE the team will use
- The color scheme of the admin dashboard
- The number of git branches to maintain
Correct answer: How the service will emit health metrics and structured logs
Observability (health metrics and structured logs) is a cross-cutting architectural concern that must be designed in from the start, not retrofitted.
Which cross-cutting concept ensures that all system components record events in a consistent, correlated manner for troubleshooting?