Why
Simonyan's own upload of the same course opens with the reason to learn this in the AI era: when an agent writes the handlers, the person is left with the decisions the handlers cannot make, which tier owns state, which database family, which protocol, which control sits at the door. That is system design, and it is exactly the part Tech #62 calls the boundary.
A design interview and a real architecture review ask the same question in the same order: what does this component need (consistency, latency, throughput, ordering), and which of the standard choices matches that need. Skipping the question does not remove the trade-off, it just means the trade-off was made by accident — a database picked because it was already running, a load-balancing algorithm left at its default, a security control added only after an incident. Naming the choice explicitly is what turns an implementation detail into something the Auditor, or an interviewer, can check.
How it works
Data tier: pick by access pattern, not habit
A single server outgrows itself when the web tier and the data tier compete for the same CPU and memory; the first split is always web tier from data tier (03:33, 07:16). After that the database choice follows the access pattern, not preference.
| Family | When | Jayverse today |
|---|---|---|
| RDBMS (Postgres, MySQL) — tables, joins (07:42, 08:18) | ACID matters: payments, banking, structured e-commerce (09:48, 12:58) | Postgres for orders — correct |
| Document (MongoDB) — nested JSON (10:30) | joinless, fast reads on denormalized documents (10:51, 12:13) | not used |
| Wide-column (Cassandra) | very large write volume, horizontal scale (11:04) | not used |
| Key-value (Redis) — in-memory (11:40) | sub-millisecond reads, ephemeral state | unknown — not yet confirmed whether Verex or Rabbit run one |
| Graph (Neo4j, Neptune) | relationship traversal, recommendations (11:19) | not used |
Scaling and load balancing: seven algorithms behind one idea
Scaling up (bigger hardware) is fast but hits a ceiling and stays a single point of failure; scaling out (more instances behind a load balancer) is the only path at real load (13:46, 14:07, 14:34). The course names seven load-balancing algorithms (17:49): round robin, least connections, least response time, IP hash, weighted, geographical, and consistent hashing. The first six route each new request by a rule; consistent hashing is different — it maps both nodes and keys onto a hash ring so that adding or removing a node only remaps the keys next to it, which is why it is the standard choice for cache and shard placement rather than plain request routing (23:12, 23:59). SPOF is handled separately from the algorithm: health checks pull a failing instance out of rotation automatically, the load balancer itself is run active-passive or active-active so it is not the new single point of failure, and unhealthy instances are replaced rather than nursed (24:27, 27:05, 29:17, 30:20).
| Mechanism | When | Jayverse today |
|---|---|---|
| Round robin | equal-capacity servers, default choice | Google Cloud Run's load balancer — default (round robin / least request) |
| Least connections / least response time | uneven request duration | not tuned — running on the platform default |
| Consistent hashing | cache or shard nodes that must survive resizing | not used yet; relevant once Verex or Devnet add a cache layer |
| Health checks + LB redundancy | any production tier | inherited from Cloud Run's managed load balancer |
API style and wire protocol: match the shape of the call
REST names resources as plural nouns, uses HTTP verbs for the operation, filters and paginates through query parameters, and caches at the HTTP layer (33:48, 01:07:05, 01:09:40, 01:17:47). GraphQL exists because Facebook's REST clients needed several round trips and still got the wrong shape of data — over- or under-fetching — so GraphQL exposes one endpoint where the client states exactly which fields it wants (Query, Mutation); the cost is that errors come back inside a 200 response as an errors array, so query-depth limits are not optional (34:26, 37:49, 01:19:44, 01:21:08, 01:23:26, 01:24:27). gRPC serializes with Protocol Buffers over HTTP/2, supports bidirectional streaming, and skips JSON parsing — which is why it is the default for internal microservice calls rather than public APIs (35:50, 36:11, 56:10, 56:35).
Underneath the API style sits the transport. TCP's handshake, ordering guarantee and retransmission make it the only acceptable choice for payments, banking and auth (59:29, 01:02:38, 01:03:57); UDP skips both and is used where a late packet is worse than a lost one — streaming, calls, games (01:01:24, 01:02:18, 01:04:00). WebSocket sits on top of TCP for real-time bidirectional push, replacing polling (52:08, 53:27); AMQP is for asynchronous queues and brokers (54:50).
| Style / protocol | When | Jayverse today |
|---|---|---|
| REST | resource CRUD, cacheable, simple clients | Verex api — REST today |
| GraphQL | many client shapes, avoid over/under-fetching | not used |
| gRPC | internal service-to-service, low overhead, streaming | not used |
| WebSocket | real-time push, avoid polling | fills stream on Verex (Tech #101's open-stream rule) |
| TCP | ordering and delivery required | Verex api, RPC calls |
| UDP | latency over loss-tolerance | not used |
Authentication vs authorization: two different questions
Authentication answers "who is this" (01:26:33); authorization answers "what can they do" (01:46:14), and the course treats these as separate systems, not one. Session-based auth keeps state on the server or in Redis and hands the client a session cookie — simple, but stateful, which constrains horizontal scaling (01:33:18, 01:34:40). JWTs are signed claims: the server verifies a signature instead of querying a database, which is what makes them stateless; a short-lived access token (15 minutes to an hour) pairs with a longer-lived refresh token kept in an HTTP-only cookie to block XSS theft (01:35:46, 01:37:57, 01:38:42). OIDC adds an ID token on top of OAuth 2.0 for social login and SSO (01:41:10, 01:43:11). For authorization the course names three models — RBAC (roles map to permission sets), ABAC (rules over attributes), and ACL (per-resource, per-user, the Google Drive model) — and is careful to state that OAuth 2.0 itself is not authentication: it is an authorization framework for delegating a limited, revocable token to a third party without handing over a password (01:39:30, 01:49:22, 01:52:49, 01:53:39).
| Choice | When | Jayverse today |
|---|---|---|
| Session + server/Redis state | simple, single-region, low scale need | not used |
| JWT (access + refresh) | stateless verification, horizontal scale | JWT + wallet signature |
| OIDC / SSO | social login, enterprise SSO | not used |
| OAuth 2.0 (delegated authorization) | third party needs limited, revocable access without a password | Rabbit's 7715 session-key mandates — same shape |
| RBAC / ACL | admin-only surfaces, per-resource sharing | Number — admin-only site |
Seven-item production security checklist
The course closes with seven controls it treats as non-negotiable before a production API ships (01:57:27–02:04:05): rate limiting per endpoint, per user/IP, and globally; CORS; SQL/NoSQL injection defense via parameterized queries or an ORM; a WAF; a VPN or private network for admin dashboards and backend-only APIs; CSRF tokens; and XSS defense via input sanitization.
| Control | Jayverse today |
|---|---|
| Rate limiting | on the RPC and the faucet (Tech #82's faucet item) |
| CORS | on the portal |
| Injection defense | via the ORM |
| WAF | none |
| VPN / private network | Number is admin-only, which is the same shape as a VPN-gated backend |
| CSRF tokens | not confirmed — needs a check |
| XSS defense | not confirmed — needs a check |
Where it lands in Jayverse
- Verex: the five tables above are the architecture review. Every row is a checkable claim about Verex's stack — Postgres for orders, REST today, TCP for the API, JWT plus wallet signature for auth — and every blank cell (Redis, CSRF, XSS) is a named follow-up rather than an unknown unknown.
- Rabbit: the 7715 mandate is the OAuth 2.0 analogy, exactly. A session-key mandate hands a delegate a limited, revocable capability without sharing a key — that is what OAuth 2.0's grant-a-token-not-a-password model is for. The portal's session-vs-JWT question (stateful cookie vs stateless signature) is the same trade-off the course lays out for scaling.
- Devnet: rate limiting and health checks belong on Anvil, not just the API. The course's SPOF section (health checks pull a bad instance out of rotation) applies to the hosted Anvil RPC the same way it applies to a web server.
- Auditor: every "Jayverse today" cell is a checkable rule, including the blank ones. "Unknown — needs a check" for Redis, CSRF and XSS is itself the correct Auditor entry: a stated gap, not a silent one.
- Eng and Theory: this is the interview syllabus, and consistent hashing is a Theory item. The 40-minute system-design interview question runs in roughly this order — data tier, scaling, API, auth, security — so this file doubles as interview prep; consistent hashing's hash-ring remapping belongs with the queueing and scheduling entries in Theory.
Verified and unverified
Verified on 2026-09-19: freeCodeCamp.org publishes long-form system-design courses on YouTube, and every concept named above is textbook material with documented behavior — ACID on RDBMS, the five database-family split, the seven standard load-balancing algorithms including consistent hashing's hash-ring remapping, REST/GraphQL/gRPC as described (GraphQL's errors-array-inside-200 behavior is a well-known footgun; gRPC's Protocol Buffers over HTTP/2 is accurate), TCP's handshake and reliability guarantees versus UDP's connectionless model, JWT as stateless signature verification, OIDC as an OAuth 2.0 extension, RBAC/ABAC/ACL as standard authorization models, and OAuth 2.0 as an authorization (not authentication) framework. Taken from the summary and not independently checked: the exact timestamps, and the video's runtime beyond "about two hours."
Sources: YouTube — freeCodeCamp.org, "System Design Course – APIs, Databases, Caching, CDNs, Load Balancing & Production Infra" · YouTube — Hayk Simonyan, original course upload (same curriculum; adds the framing that system design matters more, not less, when agents write the code, because the human is left with the boundaries) · related items: Tech #96 (Homa: TCP vs message transport), Tech #101 (ADK voice: open streams), Tech #62 (agentic engineering writes the boundaries), the faucet item a-faucet-is-a-payout, Dark Horse (b) security-hole research.
Key expressions
| Expression | 뜻 · 쓰이는 자리 |
|---|---|
| ACID | Atomicity, Consistency, Isolation, Durability(원자성·일관성·고립성·지속성) · 관계형 DB가 보장하는 트랜잭션 속성, 결제·뱅킹의 필수 조건. "ACID matters: payments, banking, structured e-commerce" |
| RDBMS | Relational Database Management System(관계형 데이터베이스 관리 시스템) · 테이블과 조인 기반 DB, Postgres·MySQL이 대표. "RDBMS (Postgres, MySQL) — tables, joins" |
| NoSQL | Not only SQL(SQL만이 아닌, 비관계형 DB 총칭) · 문서·와이드컬럼·키값·그래프 계열을 묶는 말. "SQL/NoSQL injection defense via parameterized queries or an ORM" |
| SPOF | Single Point of Failure(단일 장애점) · 그 하나가 죽으면 전체가 죽는 컴포넌트, 스케일업의 고질적 리스크. "hits a ceiling and stays a single point of failure" |
| REST | Representational State Transfer(자원을 명사·HTTP 동사로 다루는 API 스타일) · 가장 흔한 공개 API 스타일. "REST names resources as plural nouns" |
| CRUD | Create, Read, Update, Delete(생성·조회·수정·삭제) · 리소스 API의 기본 동작 네 가지. "resource CRUD, cacheable, simple clients" |
| gRPC | gRPC Remote Procedure Call(구글이 만든 RPC 프레임워크) · Protocol Buffers + HTTP/2, 내부 마이크로서비스 표준. "gRPC serializes with Protocol Buffers over HTTP/2" |
| TCP | Transmission Control Protocol(전송 제어 프로토콜) · 순서 보장·재전송이 있는 연결형 전송, 결제·인증에 필수. "TCP's handshake, ordering guarantee and retransmission" |
| UDP | User Datagram Protocol(사용자 데이터그램 프로토콜) · 핸드셰이크·재전송 없는 비연결형, 지연이 유실보다 나쁠 때. "UDP skips both and is used where a late packet is worse than a lost one" |
| AMQP | Advanced Message Queuing Protocol(고급 메시지 큐잉 프로토콜) · 비동기 큐·브로커 표준. "AMQP is for asynchronous queues and brokers" |
| JWT | JSON Web Token(JSON 웹 토큰) · 서명된 클레임, DB 조회 없이 서명만 검증하는 무상태 인증. "JWTs are signed claims: the server verifies a signature instead of querying a database" |
| OAuth 2.0 / OIDC / SSO | Open Authorization / OpenID Connect / Single Sign-On(위임 인가 프레임워크 / 그 위의 신원 계층 / 통합 로그인) · 비밀번호 없이 제한된 토큰을 제3자에 위임하는 한 가족. "OAuth 2.0 itself is not authentication: it is an authorization framework for delegating a limited, revocable token" |
| RBAC / ABAC / ACL | Role-Based / Attribute-Based Access Control, Access Control List(역할 기반·속성 기반 접근 제어, 접근 제어 목록) · 인가(무엇을 할 수 있는가)의 세 표준 모델. "RBAC (roles map to permission sets), ABAC (rules over attributes), and ACL (per-resource, per-user, the Google Drive model)" |
| CORS | Cross-Origin Resource Sharing(교차 출처 리소스 공유) · 어느 출처가 API를 호출할 수 있는지 제한. "rate limiting per endpoint, per user/IP, and globally; CORS" |
| WAF | Web Application Firewall(웹 애플리케이션 방화벽) · 엣지에서 악성 요청을 거르는 계층. "a WAF; a VPN or private network" |
| VPN | Virtual Private Network(가상 사설망) · 관리자 대시보드·백엔드 전용 API를 사설망 안에만 두는 방식. "a VPN or private network for admin dashboards and backend-only APIs" |
| CSRF | Cross-Site Request Forgery(사이트 간 요청 위조) · 로그인된 사용자를 속여 원치 않는 요청을 보내게 하는 공격, 토큰으로 방어. "CSRF tokens; and XSS defense via input sanitization" |
| XSS | Cross-Site Scripting(사이트 간 스크립팅) · 악성 스크립트를 삽입하는 공격, 입력 sanitize와 HTTP-only 쿠키로 방어. "a longer-lived refresh token kept in an HTTP-only cookie to block XSS theft" |
| hash ring (consistent hashing) | 해시 링(노드와 키를 원형 해시 공간에 배치하는 구조) · 노드 증감 시 재매핑을 최소화하는 이유. "it maps both nodes and keys onto a hash ring so that adding or removing a node only remaps the keys next to it" |
| over-fetching / under-fetching | 과다 조회 / 과소 조회(필요보다 많이 또는 적게 데이터를 받는 문제) · GraphQL이 REST 대신 등장한 이유. "over- or under-fetching" |