Three-Tier Web Application diagram template
The classic presentation, application and data tiers behind a load balancer.
About this design
The three-tier layout remains the right default for most products because each tier has one reason to change. A load balancer terminates TLS and spreads traffic across stateless application servers, which can be added or removed freely because no session lives on any one of them; sessions go to a shared Redis store instead. The application tier holds business logic and talks to a primary database for writes and a read replica for reporting queries. Static files are offloaded to a CDN so the servers only handle dynamic requests. Start from this template when someone says they need microservices and you want to show how far a well-run monolith goes. Then annotate where it would first hurt: the database connection pool, the deployment that releases everything at once, or the one team that owns the whole codebase.
Diagram as text
This is the source of the diagram, in the ArchBoard diagram DSL. Paste it into Tools, Diagram from text to rebuild or change it.
title "Three-tier web app"
direction TB
user "Users" -> cdn cloudflare "CDN" -> lb nginx "Load balancer" -> service web "Web app"
[web x3]
web -> cache redis "Session store"
web -> db postgres "Primary database"
primary-database -> db postgres "Read replica"Related guides
More web architecture templates
Microservices with API Gateway
An API gateway in front of independently deployable services that each own their data.
Serverless API
An HTTP API backed by stateless functions, a managed database and an event queue for slow work.
Jamstack Site
Pre-built static pages on a CDN with serverless functions for the dynamic parts.