Skip to content
StackDecode
System Design
3. Client-Server ArchitectureAnimated

N-Tier Architecture

Three tiers extended with more layers such as caching and messaging.

The idea

Adds tiers like API gateway, cache, queue and search as the system grows, each with a clear role.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

BrowserWeb tierApp tierCacheDatabase
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

More tiers separate more concerns: web, application, cache, data.

step:
1/4
at:
Browser
1/12

The green dot is a request moving through the system.

Step by step

  1. 1Request enters through a gateway
  2. 2Services call a cache first
  3. 3Misses go to the database
  4. 4Slow work is queued

Where it is used

Larger applications.

Watch out for

Each extra tier adds latency and operational cost.

Related