System Design Cheatsheet

Comprehensive guide to system design cheatsheet covering architecture, implementation, testing, and operational patterns for production engineering teams.

System design is the art of turning requirements into scalable, reliable, and maintainable infrastructure. This cheatsheet guides engineers through the essential decisions, tools, and patterns for designing systems that work under real load—when the database slows, the network flaps, and the service fails in production. It is not a tutorial, but a field manual: use it during design sessions, architecture reviews, and on-call rotations.

Planning the System

Define Scope and Requirements

Start with a clear statement of what the system must do. Write the requirements in user-centric, measurable terms.

Use the S.M.A.R.T. criteria implicitly: Specific, Measurable, Achievable, Relevant, Time-bound. Do not assume. Ask:

Identify Key Components

Break the system into distinct parts:

Map components to services using Service Contracts:

Designing for Scale

Choose a Deployment Strategy

Select a deployment pattern based on traffic and risk tolerance.

Use feature flags to control rollout:

  {
    "user_id": 123,
    "name": "Alice",
    "features": {
      "new-user-api": true,
      "dark-mode": false
    }
  }

Choose a Database Strategy

Select a Database Type

    {
      "user_id": 123,
      "profile": {
        "name": "Alice",
        "preferences": {
          "theme": "dark",
          "notifications": ["email", "push"]
        }
      },
      "last_login": "2024-03-15T10:00:00Z"
    }

Scale the Database

Managing Data Flow

Introduce Message Queues

Use message queues (Kafka, RabbitMQ, Amazon SQS) to decouple components.

  {
    "event_type": "user_registered",
    "user_id": 123,
    "timestamp": "2024-03-15T10:00:00Z"
  }

Use Caching Strategically

Cache Layers

Cache Invalidation Strategies

Ensuring Reliability

Handle Failures Gracefully

Network and Service Failures

    {
      "timestamp": "2024-03-15T10:00:00Z",
      "level": "error",
      "service": "user-api",
      "request_id": "abc123",
      "message": "Failed to fetch user from database",
      "error": {
        "type": "DatabaseError",
        "code": "500",
        "details": "Connection timeout after 5000ms"
      }
    }

Load Balancing

Circuit Breaker Pattern

  circuit_breaker:
    failure_threshold: 5
    timeout: 1000
    retry_attempts: 3
    retry_delay: 200
    half_open_threshold: 2

Monitoring and Observability

Logging

Metrics

Tracing

    trace_id: abc123
      span_id: 1
        operation: "HTTP GET /api/v1/users/123"
        start: 2024-03-15T10:00:00.123Z
        end: 2024-03-15T10:00:00.345Z
        tags: { user_id: 123, client: "mobile" }
      span_id: 2
        operation: "Database query: SELECT * FROM users WHERE id = $1"
        start: 2024-03-15T10:00:00.200Z
        end: 2024-03-15T10:00:00.300Z
        tags: { query: "SELECT * FROM users WHERE id = 123" }

Final Checks

This is the system design cheatsheet. Use it to build systems that are not just functional, but resilient, observable, and ready for growth.

This page was rewritten on 18 October 2026. It replaced a templated version that was not specific to its own title. How these pages are written and checked. If anything here is wrong, tell us at [email protected] and we will correct it.