System Design Space
Knowledge graphSettings

Updated: March 2, 2026 at 6:50 PM

Social Media Infrastructure View

mid

Classic task: SLO-driven social platform architecture, failure isolation, graceful degradation and observability.

Acing SDI

Practice task from chapter 14

Infrastructure view of social media: from feature-level design to operational architecture.

Читать обзор

Social Media Infrastructure View is not about one feature. It is about platform operability: SLOs, fault isolation, observability, and controlled rolloutfor a large consumer system.

Functional requirements

  • Post publishing and interaction capture (like/comment/share).
  • Timeline generation for different user segments.
  • Moderation hooks and safe feature degradation.
  • Operational tooling for incident response.

Non-functional requirements

  • SLOs for key user journeys: open feed, publish, refresh.
  • Horizontal scale under celebrity spikes.
  • Controlled blast radius between services.
  • Observability baseline: metrics, logs, traces, error budgets.

High-Level Architecture

Theory

Twitter/X

Practical feed-system case: fanout, cache topology, ranking, and scaling trade-offs.

Читать обзор

High-Level Architecture

feed platform + ranking + SLO control loop

This topology combines publish path, feed serving path, and an operational control loop for platform stability.

Client Apps
web / mobile
API Gateway
auth + routing
Post Service
create/update content
Timeline Service
feed assembly
Ranking Service
personalization
Graph Service
follows/edges
Event Bus
fanout backbone
Feed Cache
hot timeline
Post Store
durable source
Graph Store
social edges
Notification
push/email
Moderation
policy checks
Observability
logs/metrics/traces
SLO Controller
degradation policy

The architecture separates publish/feed paths and a dedicated control loop for SLO, observability, and degradation policies. This keeps blast radius limited during spikes and incidents.

Write/Read Paths

Write/Read Paths

How publishing flows through infrastructure and how timelines are served under heavy read load.

Write path: post request is validated, committed to durable storage, and propagated through async fanout into timeline/notification/moderation pipelines.

Client Post

create content

User publishes content from mobile/web client.

Gateway + Auth

validate request

Gateway checks auth/quota and routes request to post service.

Post Service

durable commit

Post is committed into durable storage and event is produced.

Async Fanout

timeline + moderation

Event fans out into timeline build, moderation, and notification pipelines.

User Signals

feed + notifications

Followers receive timeline updates/notifications without blocking publish ACK.

Write path checkpoints

  • Durable post commit happens before downstream fanout.
  • Moderation and notifications are typically asynchronous and isolated from core feed availability.
  • Celebrity posts require controlled fanout to avoid consumer overload.

Runtime strategies

  • Bulkheads and circuit breakers between feed and dependent services.
  • Graceful degradation with fallback ranking and feature gating.
  • Canary/blue-green rollout for critical paths.
  • Autoscaling by queue depth and latency saturation.

Observability

  • SLOs for user journeys, not only internal APIs.
  • Trace correlation: feed request -> graph fetch -> ranking -> fanout.
  • Error budget policy for engineering prioritization.
  • Runbook-driven incidents with postmortem feedback loop.

Critical trade-offs

  • Fanout-on-write vs fanout-on-read for celebrity users.
  • Latency vs ranking/personalization depth.
  • Timeline consistency vs availability under partial outages.
  • Release speed vs production risk.

Related chapters

Related materials

Enable tracking in Settings

System Design Space

© 2026 Alexander Polomodov