cchakri.aiLearn All courses
// COURSE · ARCHITECTURE

System Design

A practical path through requirements, estimation, architecture, distributed data, reliability, and system design interviews.

01

Frame the problem

Syllabus

  1. 01A repeatable interview approach
  2. 02Functional requirements and user journeys
  3. 03Quality attributes and constraints

Detailed content

A repeatable interview approach

Treat the interview as a design conversation. Confirm the problem, identify the most important constraints, and keep a visible list of assumptions. Work from a simple baseline toward improvements. Explain why each component exists, what it costs, and what failure it addresses. Reserve time to summarize the design and its trade-offs.

Functional requirements and user journeys

Write down the actions the system must support before selecting technologies. Identify the actors, their main journeys, and the data each action creates or reads. Separate essential behavior from optional features. A short list of explicit use cases gives the design a boundary and prevents unrelated features from taking over the interview.

Quality attributes and constraints

Translate words such as “fast” and “highly available” into measurable targets: latency percentiles, availability, durability, privacy, and expected growth. Ask about region, compliance, budget, and operational limits. These constraints determine which architecture is appropriate; without them there is no defensible reason to choose one design over another.

02

Estimate and define interfaces

Syllabus

  1. 01Traffic and capacity estimates
  2. 02API contracts
  3. 03Data model and access patterns

Detailed content

Traffic and capacity estimates

Estimate active users, requests per second, average payload, and data retained. Use round numbers and show your arithmetic so assumptions can be corrected quickly. Separate average from peak traffic. The goal is not perfect forecasting; estimates reveal whether one database, a cache, or a partitioning strategy is likely to become the first bottleneck.

API contracts

Define the main request and response shapes before drawing every service. Specify identifiers, pagination, validation errors, authentication, and idempotency for repeated writes. A stable contract lets clients and services evolve independently. Include the operations the requirements call for and avoid adding endpoints that have no clear user or system need.

Data model and access patterns

List entities, ownership, relationships, and the queries the application must answer. Model around correctness first, then examine read and write volume. A normalized relational model is a sound baseline for transactional data; denormalized views may be added for measured read patterns. Explain how identifiers, indexes, and retention support the access paths.

03

Choose architecture building blocks

Syllabus

  1. 01Service boundaries and request flow
  2. 02Caching and content delivery
  3. 03Queues, events, and background jobs

Detailed content

Service boundaries and request flow

Start with the smallest architecture that meets the requirements. Trace one request from client through API, application logic, and storage. Split a service when ownership, scaling, security, or deployment needs justify the added network and operational complexity. Keep domain rules near the data and behavior they govern.

Caching and content delivery

A cache stores a reusable result closer to the reader and reduces load on slower systems. Choose a cache key, lifetime, invalidation rule, and behavior on a miss. Discuss stale data and hot keys. A CDN is useful for content distributed geographically; application caches suit repeated reads whose freshness requirements are understood.

Queues, events, and background jobs

A queue separates a producer from work that can happen later, smoothing bursts and protecting request latency. Define delivery guarantees, retry policy, idempotency, ordering, and dead-letter handling. Events communicate facts that have happened; commands request work. Use asynchronous processing when delayed completion is acceptable and the workflow can report its status.

04

Design for distributed behavior

Syllabus

  1. 01Replication, partitioning, and consistency
  2. 02Failure handling and resilience
  3. 03Observability, security, and cost

Detailed content

Replication, partitioning, and consistency

Replication keeps multiple copies of data; partitioning distributes different records across machines. Both improve capacity or availability but complicate routing and correctness. State which reads may be stale, how writes are acknowledged, and how replicas recover. Choose consistency guarantees from user-visible requirements rather than treating “strong” or “eventual” as automatic defaults.

Failure handling and resilience

Networks fail partially: a dependency can be slow, unreachable, or return an error while other components remain healthy. Use bounded timeouts, exponential backoff with jitter, and retries only when operations are safe to repeat. Add bulkheads or circuit breakers where they protect shared capacity. Define what the service returns when a dependency is unavailable.

Observability, security, and cost

Design logs, metrics, and traces around the questions an operator must answer. Track request rate, errors, latency, saturation, and business outcomes. Authenticate callers, authorize each action, protect secrets, and minimize stored personal data. Estimate major storage, compute, network, and managed-service costs, then identify the assumptions that could change them.