Architectural Patterns and Anti-Patterns Questions
The reusable structures and common traps of system design: layered, hexagonal, CQRS, and event-sourcing patterns, and anti-patterns such as the distributed monolith, chatty services, and god-service sprawl. Covers when each pattern applies and the smell that signals a wrong turn. A catalog-level view distinct from bespoke case studies.
What is one architectural pattern or technology stack you prefer using and why? Describe a real project where it fit well and one scenario where it would be a poor choice. Be explicit about trade-offs and operational costs.
Compare a monolithic application to a microservices architecture for a fast-growing e-commerce startup. Explain trade-offs in deployment, team organization, operational complexity, latency, fault isolation, and time-to-market with concrete examples of when one is preferable over the other.
Explain what a software design pattern is and why design patterns matter when building large-scale distributed systems. In your answer, include: 1) concrete examples of patterns commonly used at service and architecture level (e.g., circuit breaker, bulkhead, saga), 2) benefits for teams (consistency, communication, reuse), 3) common trade-offs such as added complexity, coupling, or performance overhead, and 4) one scenario where choosing a popular pattern becomes an anti-pattern.
Describe the circuit breaker and bulkhead patterns used to improve system resilience. Explain how each pattern protects system stability, typical triggers and thresholds, and provide a simple example of using them when one downstream dependency becomes slow or fails.
Implement a thread-safe circuit breaker class in Python with states CLOSED, OPEN, and HALF_OPEN. Requirements: support failure_threshold (consecutive failures), recovery_timeout (seconds), and success_threshold for HALF_OPEN. Provide methods call(func, *args, **kwargs) and current_state(). Do not use external libraries; focus on correctness and simple concurrency safety.
Unlock Full Question Bank
Get access to all 23 Architectural Patterns and Anti-Patterns interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.