Architectural Patterns and Anti-Patterns Questions

Architecture-level patterns and the anti-patterns that signal a wrong turn. Patterns: layered and n-tier architecture, including where cross-cutting concerns like authentication, rate-limiting and tracing belong, dependency injection trade-offs, and thin-versus-fat controller design; hexagonal (ports and adapters) and clean architecture; CQRS and event sourcing; backend-for-frontend; plugin (microkernel) extension models; and the coupling, cohesion, encapsulation and separation-of-concerns principles behind them, including when each applies and what it costs. Anti-patterns: distributed monolith, chatty services, shared-database coupling, cyclic service dependencies, leaky abstractions that expose internal schemas, and golden-hammer pattern adoption. Covers the detection signals (deploy coupling, call-graph fan-out, change amplification, trace evidence), incremental remediation, and architecture governance that keeps smells from recurring. This is about diagnosing and fixing the smell in an existing design, not the monolith-versus-microservices decision itself.

EasyTechnical
91 practiced

Describe a typical three-tier (multi-tier) layered web architecture: presentation/UI, application/business logic, and persistence/data. For each tier, name its responsibilities, then trace how a single request flows through the system, from the client through ingress, load balancing, and the application tier down to the data tier and back. What are the trade-offs of this architecture (scalability, deployment complexity, testability) compared to a simpler two-tier design or a flatter, event-driven one?

MediumTechnical
97 practiced

Design patterns can become anti-patterns when they're reached for out of habit rather than fit. Describe a realistic case where adopting a popular pattern (at the service or architecture level) created more complexity or risk than it solved. What made it the wrong fit for that context, and what would have signaled the mismatch earlier?

MediumTechnical
139 practiced

Explain dependency injection (DI) and the differences between constructor injection, setter injection, and the service-locator approach. When designing a layered backend, what are the advantages and the potential pitfalls of leaning on a DI framework in your service and repository layers?

MediumSystem Design
91 practiced

You are designing a new SaaS web application with a frontend, API gateway, application layer, business logic layer, and persistence layer. For each layer, describe its core responsibilities, what interfaces it should expose, and how you'd enforce separation of concerns to ease testing, deployment, and security boundaries across teams.

HardSystem Design
94 practiced

Design an extensible plugin architecture for a platform where customers or internal teams can add custom business logic (for example, custom validation rules or scoring logic) without modifying the core service. Cover how plugins are structured and versioned, how you'd validate and sandbox them for safety, whether they can be hot-reloaded, how you'd enforce backward compatibility across plugin versions, and how you'd test a new plugin without risking the core service.

Unlock Full Question Bank

Get access to all 20 Architectural Patterns and Anti-Patterns interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.