skip to content

Architectural Styles

The catalogue of named macro-structures a system can take, from monolith to microservices to space-based, plus how to pick one and how to combine several. Interviews use style names as shorthand, so knowing the trade-offs behind each name saves a lot of explaining.

part ofSoftware design & architectureoverview, primer and where to startread it →
on this pageshow

explore

questions

166 · 4 sections

In a microkernel (plug-in) architecture, what is the difference between the 'core system' and a 'plug-in', and what does each side own?

level: juniorimportance: must knowfreq 55%
basics
~10 s

The core is a small always-on engine that only knows how to load and talk to plug-ins. Plug-ins are separate, swappable pieces of code that add actual features, each following rules the core sets.

open as a page

In plain terms, what is the Pipes and Filters architectural style, and can you give an everyday example of it?

level: juniorimportance: must knowfreq 70%
basics
~20 s

It's a design where data flows through a chain of independent processing steps called filters, connected by pipes. Each filter does one small job and hands its output to the next, like workers on an assembly line.

open as a page

What is the client-server architectural style, and what does it mean for a client to send a 'request' and a server to send back a 'response'?

level: juniorimportance: must knowfreq 85%
basics
~20 s

The client-server style splits an app into two roles: a client that asks for something (a request), and a server that has the data or logic and answers back (a response). The client initiates; the server waits and replies.

open as a page

In a typical N-tier layered architecture with presentation, business, and data access layers, which direction are calls allowed to flow, and why shouldn't the data access layer call back into the presentation layer?

level: juniorimportance: must knowfreq 70%
basics
~20 s

Calls only go downward: UI talks to business logic, which talks to data access. Data access never calls back up - that would tangle everything together, making each part impossible to change or test alone.

open as a page

What is a modular monolith, and what concretely distinguishes it from a monolith whose packages happen to be organized by feature but have no enforced boundaries?

level: juniorimportance: must knowfreq 80%
basics
~10 s

One app, one deployment, but cut into modules that hide their internals and only talk through defined entry points - unlike a folder-organized monolith where any code can still call any other code directly.

open as a page

In Clean Architecture, the 'Dependency Rule' says source code dependencies can only point inward. If a UseCase class needs to save data to a PostgreSQL database, why shouldn't that UseCase class directly import a JDBC or ORM library?

level: juniorimportance: must knowfreq 75%
basics
~10 s

Inner circles (business rules) must never depend on outer circles (frameworks/DB). The use case defines an interface it needs; a database-specific class outside implements it. This keeps business logic free of database code.

open as a page

In Hexagonal Architecture (Ports & Adapters), what is a 'port', and what distinguishes a driving (primary) port from a driven (secondary) port?

level: juniorimportance: must knowfreq 75%
basics
~20 s

A port is an interface the core app defines. Driving ports are ways the outside world calls INTO the app (like an API). Driven ports are ways the app calls OUT to things it needs (like a database).

open as a page

In the classic MVC (Model-View-Controller) pattern, what job does each of the Model, View, and Controller play, and why does splitting responsibilities this way help maintainability?

level: juniorimportance: must knowfreq 85%
basics
~10 s

Model holds data and business rules, View shows it on screen, Controller takes user input and decides what happens next. Splitting them means you can change how something looks without touching how it works.

open as a page

In Onion Architecture, why is the domain model placed at the center of the design instead of the database or UI?

level: juniorimportance: must knowfreq 55%
basics
~20 s

Onion Architecture puts the business rules in the middle of the app, like the core of an onion, and everything else (database, web framework, UI) sits in layers wrapped around it. The middle never needs to know about the outer layers.

open as a page

Clean Architecture draws four concentric rings - Entities, Use Cases, Interface Adapters, and Frameworks & Drivers. For a typical web application, what kind of code lives in each of these four rings, and how does data get from an outer ring's format into a form the innermost ring can use?

level: middleimportance: must knowfreq 80%
basics
~20 s

Entities hold core business rules; Use Cases run application-specific workflows; Interface Adapters translate between the app and the outside world (controllers, presenters); Frameworks/Drivers are the actual web server, DB, UI. Data crosses rings as plain data structures, converted at each boundary.

open as a page

In an event-driven system, a service publishes an 'OrderPlaced' event instead of calling the shipping service directly. What are producers and consumers, and how does this decouple the two services?

level: juniorimportance: must knowfreq 75%
basics
~10 s

A producer creates and sends out an event (like 'something happened') without knowing who's listening. A consumer picks up events it cares about and reacts. Neither needs to know the other exists directly.

open as a page

In the microservices architectural style, what does it mean for a service to be 'independently deployable', and why is that the defining trait of the style?

level: juniorimportance: must knowfreq 70%
basics
~10 s

A microservice can be built, tested, and released on its own, without redeploying other services at the same time. This is the core feature that lets teams move fast without waiting on each other.

open as a page

What does it mean for a service in a Service-Oriented Architecture (SOA) to be 'coarse-grained', and why did SOA favor this over many small services?

level: juniorimportance: must knowfreq 40%
basics
~10 s

A coarse-grained SOA service bundles a whole business capability (like 'Order Management') behind one interface, instead of splitting into many tiny services, so fewer calls and less network chatter are needed.

open as a page

In a microfrontend architecture, what is the basic difference between mounting a microfrontend as a JavaScript bundle directly into the DOM versus embedding it via an iframe?

level: juniorimportance: must knowfreq 65%
basics
~20 s

JS mount loads the microfrontend's code into the same page so it shares the DOM and can talk to other parts easily. An iframe loads it as a separate mini-webpage inside a box, fully isolated but harder to communicate with.

open as a page

In a microfrontend architecture using Webpack Module Federation, what is the difference between a 'host' application and a 'remote' application, and how do they connect at runtime?

level: juniorimportance: must knowfreq 55%
basics
~20 s

A host is the app that loads pieces from other apps; a remote is the app that shares its pieces. Webpack lets the host fetch and run the remote's code straight from the browser, without both being built together.

open as a page

When starting a new system, what should drive the choice of architectural style (layered monolith, modular monolith, microservices, event-driven, and so on) — and what should not?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Choose from the qualities the system must have (scale, availability, speed of change, cost) plus its constraints (team size, skills, deadline, budget, regulation). Do not choose by fashion, resume value, or what a famous company uses.

open as a page

What is a hybrid (mixed-style) architecture, and why do most real systems combine several architectural styles instead of using exactly one?

level: juniorimportance: must knowfreq 58%
basics
~20 s

A hybrid architecture combines more than one architectural style in one system, for example a modular monolith plus serverless functions at the edge. Different parts of a system have different needs, so one style rarely fits everything.

open as a page

What is an Architecture Decision Record (ADR), what does it contain, and why is capturing the rationale for a style choice as valuable as the choice itself?

level: middleimportance: must knowfreq 58%
basics
~20 s

An ADR is a short document recording one significant architecture decision: the context, the options considered, the decision, and its consequences. It matters because it preserves why something was chosen, so later teams can tell a deliberate trade-off from an accident.

open as a page

Compare a modular monolith with microservices across scalability, deployability, testability, operational cost and data consistency. When would you pick each?

level: middleimportance: must knowfreq 88%
basics
~20 s

A modular monolith is one deployable unit with internal module boundaries: simple, cheap, easy to test, with single-database transactions, but it scales and ships as a whole. Microservices deploy and scale independently and isolate failures, but add network calls, eventual consistency and operational cost.

open as a page

In a system of microservices, when should two services communicate through synchronous request/response calls versus asynchronous events on a broker, and what changes about failure handling in each case?

level: middleimportance: must knowfreq 74%
basics
~20 s

Use a synchronous call when the caller needs an answer right now to continue its work. Use an asynchronous event when you are announcing that something happened and other services can react later, without the caller waiting.

open as a page