Skip to content

Three-Tier Architecture

The Three-Tier architecture is the foundational pattern for enterprise web applications, enforcing separation of concerns.

  • Responsibility: Rendering UI and capturing user input. Client-side web APIs (MDN).
  • Technologies: SPA Frameworks (React, Vue), Mobile SDKs (iOS, Android).
  • State: Ideally stateless; maintains session via tokens (JWT) or cookies.
  • Optimization: Assets served via CDN to minimize latency.
  • Responsibility: Business logic, authorization, data processing. What is Middleware? (Red Hat).
  • Technologies: REST/GraphQL APIs (Node.js, Go, Python, Java).
  • Scaling: Horizontal scaling behind a Load Balancer.
  • Statelessness: Crucial for scaling. No local session storage; use external stores (Redis) or stateless tokens.
  • Responsibility: Data storage and retrieval. Types of Databases (AWS).
  • Technologies:
    • RDBMS: PostgreSQL, MySQL (ACID compliance).
    • NoSQL: MongoDB, DynamoDB (Flexible schema, high throughput).
    • Cache: Redis, Memcached (Sub-millisecond access).
  • Scaling: Vertical (bigger instance) or Horizontal (Sharding/Read Replicas).
  • Monolith: All tiers in a single deployable unit. Simple to develop, hard to scale components independently.
  • Microservices: Application tier broken into small, independent services communicating via gRPC/HTTP. Complex operations, high scalability.