Architecture · Lesson 04

How do three-tier and multi-tier architectures divide the work?

Three-tier architecture separates presentation, application logic, and data responsibilities; multi-tier architecture extends that idea with more focused layers and boundaries.

The core idea

Separate responsibilities before you scale them.

A tier is a responsibility boundary in an application system. It describes which work belongs together and which work should communicate through an explicit interface. Separating tiers makes changes, access rules, scaling decisions, and failures easier to reason about.

A tier is not automatically a physical machine, a subnet, or a network layer. One host can run several tiers during development, while production may spread one tier across many instances.

Logical separation comes first.Three-tier and multi-tier describe how the work is divided. Deployment decides where each responsibility runs.

Build the model

Three tiers provide a useful starting point.

01

Presentation tier

Handles the user interface, API edge, input validation, and representation of requests and responses.

02

Application tier

Applies business rules, coordinates use cases, manages workflows, and decides what data or services are needed.

03

Data tier

Owns durable storage, queries, transactions, indexes, backups, and the rules for protecting persisted data.

The tiers communicate through contracts. The presentation tier should not reach into database tables to bypass application rules, and the data tier should not need to know how a browser renders a response.

Trace the exchange

A request crosses controlled boundaries.

When a user loads an account page, the browser sends a request to the presentation tier. That tier authenticates and validates the request, then calls the application tier. Business logic checks permissions and coordinates the data tier. The result returns through the same contracts and is translated into an HTTP response.

01

Receive

The edge accepts the request, terminates TLS, authenticates the caller, and validates its shape.

02

Decide

The application tier applies policy and coordinates the required operations.

03

Persist

The data tier reads or writes through a controlled query and transaction boundary.

04

Respond

The result travels back through the application and presentation contracts.

A network hop is not a tier.Two tiers may be separated by a network, and one tier may be distributed across several network locations.

Add focused responsibilities

Multi-tier architecture splits a tier when its work needs a boundary.

Multi-tier, or N-tier, architecture extends the three-tier model. A system may introduce an API gateway, identity service, service layer, cache, message broker, search tier, reporting tier, or integration tier when those responsibilities have different ownership, scaling, security, or failure behavior.

01

Edge tier

Routes requests, terminates TLS, applies rate limits, and exposes only intended entry points.

02

Service tier

Runs independently deployable services with focused business capabilities.

03

Integration tier

Connects external systems, queues, events, and protocols without leaking them into every service.

04

Specialized data

Separates transactional storage, cache, search, analytics, and archival workloads when their needs differ.

Deploy the system

Logical tiers and physical tiers are different decisions.

A small application may deploy the browser-facing code, application logic, and database on one server while preserving logical interfaces. A larger system may place a load balancer and API gateway at the edge, several application instances behind them, a private database network, and separate workers for asynchronous tasks.

Containers, virtual machines, availability zones, and subnets are deployment tools. They can reinforce a tier boundary, but they do not define the application responsibility by themselves.

01

One host

Useful for development or small workloads, with simple operations and limited isolation.

02

Separated hosts

Improve independent scaling and access control, but add latency and operational dependencies.

03

Replicated tiers

Run several instances behind routing or load balancing to improve capacity and availability.

Protect the boundaries

Each tier should expose only the access the next tier needs.

The presentation tier may be public, while application services and databases remain private. A firewall or security group can restrict which tier may connect to which port. Service identities, least privilege, input validation, secrets management, encryption, and audit logs reinforce the boundaries.

Layering is not automatically security. A public application server with unrestricted database credentials is still a weak design, even if the system has three named tiers.

Control the direction of trust.The data tier should trust only the application identities and operations it requires, not every client that can reach the front door.

Choose the shape

More tiers bring control and cost together.

01

Benefits

Independent scaling, clearer ownership, narrower access, focused deployments, and easier replacement of one responsibility.

02

Costs

More network calls, latency, contracts, monitoring, credentials, deployment coordination, and failure modes.

03

Good boundary

Split a responsibility when its change rate, security needs, scaling profile, data ownership, or failure behavior justifies the boundary.

A multi-tier design should make a real decision easier. Adding layers only to match a diagram creates indirection without improving the system.

Knowledge check

Test your tier model

Answer ten questions.

0 / 10