DM
All learning areas
Architecture

System Design

Design useful systems from requirements through trade-offs and failure modes.

Topic library

URL shortenerNotification serviceReal-time chatFile-upload servicePayment systemAuthentication serviceSearch serviceNews feedAnalytics pipelineAppointment bookingMulti-tenant SaaSRate limiterBackground job system

Featured guides

Practical starting points for the highest-value topics.

System-design method

Use the same disciplined sequence before drawing boxes.

  1. Clarify users, core flows, scale, latency, availability, consistency, privacy, and budget.
  2. Define APIs and the minimum data model.
  3. Draw a simple end-to-end design that works at today's scale.
  4. Identify bottlenecks, dependencies, failure modes, and observability.
  5. Evolve only the constrained parts and explain each trade-off.

Key idea: Requirements drive architecture; diagrams do not create requirements.

Notification service

Deliver email, SMS, and push messages without blocking product requests.

  1. Accept a typed notification request with an idempotency key.
  2. Persist intent, preferences, template version, and delivery status.
  3. Queue one job per channel and isolate provider adapters.
  4. Retry transient failures, dead-letter poison jobs, and disable invalid destinations.
  5. Measure queued, accepted, delivered, failed, opened, and acted-on separately.

Key idea: Provider acceptance is not the same as user delivery.

Multi-tenant SaaS

Keep tenant data isolated while supporting shared infrastructure.

  1. Resolve trusted tenant context during authentication.
  2. Include tenant ownership in schemas, indexes, caches, jobs, and object storage.
  3. Enforce isolation at every data-access boundary.
  4. Add tenant-aware quotas, audit logs, exports, and deletion.
  5. Test cross-tenant access as a first-class security requirement.

Key idea: Tenant isolation must survive every alternate access path.