System Design for Interviews and Beyond

System Design for Interviews and Beyond

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 75 Lessons (7h 53m) | 1.37 GB

System Design for Interviews and Beyond

Course syllabus
System requirements (functional and non-functional requirements)
Functional requirements (how to define, working backwards approach)
High availability (time-based and count-based availability, design principles behind high availability, processes behind high availability, SLO, SLA)
Fault tolerance, resilience, reliability (error, fault, failure, fault tolerance, resilience, game day vs chaos engineering, expected and unexpected failures, reliability)
Scalability (vertical and horizontal scaling, elasticity vs scalability)
Performance (latency, throughput, percentiles, how to increase write and throughput, bandwidth)
Durability (backup (full, differential, incremental), RAID, replication, checksum, availability vs durability)
Consistency (consistency models, eventual consistency, linearizability, monotonic reads, read-your-writes (read-after-write), consistent prefix reads)
Maintainability, security, cost (maintainability aspects (failure modes and mitigations, monitoring, testing, deployment), security aspects(CIA triad, identity and permissions management, infrastructure protection, data protection), cost aspects (engineering, maintenance, hardware, software))
Summary of system requirements (a single list of the most popular non-functional requirements)
Regions, availability zones, data centers, racks, servers (how hardware helps to achieve certain qualities)
Physical servers, virtual machines, containers, serverless (pros and cons of different computing environments, what are they good for)
Synchronous vs asynchronous communication (synchronous and asynchronous request-response models, asynchronous messaging)
Asynchronous messaging patterns (message queuing, publish/subscribe, competing consumers, request/response messaging, priority queue, claim check)
Network protocols (TCP, UDP, HTTP, HTTP request and response)
Blocking vs non-blocking I/O (socket (blocking and non-blocking), connection, thread per connection model, thread per request with non-blocking I/O model, event loop model, concurrency vs parallelism)
Data encoding formats (textual vs binary formats, schema sharing options, backward compatibility, forward compatibility)
Message acknowledgment (safe and unsafe acknowledgment modes)
Deduplication cache (local vs external cache, adding data to cache (explicitly, implicitly), cache data eviction (size-based, time-based, explicit), expiration vs refresh)
Metadata cache (cache-aside pattern, read-through and write-through patterns, write-behind (write-back) pattern)
Queue (bounded and unbounded queues, circular buffer (ring buffer) and its applications)
Full and empty queue problems (load shedding, rate limiting, what to do with failed requests, backpressure, elastic scaling)
Start with something simple (similarities between single machine and distributed system concepts, interview tip)
Blocking queue and producer-consumer pattern (producer-consumer pattern, wait and notify, semaphores, blocking queue applications)
Thread pool (pros and cons, CPU-bound and I/O-bound tasks, graceful shutdown)
Big compute architecture (batch computing model, embarrassingly parallel problems)
Log (memory vs disk, log segmentation, message position (offset))
Index (how to implement an efficient index for a messaging system)
Time series data (how to store and retrieve time series data at scale and with low latency)
Simple key-value database (how to build a simple key-value database, log compaction)
B-tree index (how databases and messaging systems use B-tree indexes)
Embedded database (embedded vs remote database)
RocksDB (memtable, write-ahead log, sorted strings table (SSTable))
LSM-tree vs B-tree (log-structured merge-tree data structure, write amplification, read amplification)
Page cache (how to increase disk throughput (batching, zero-copy read))
Push vs pull (pros and cons of both models)
Host discovery (DNS, anycast)
Service discovery (server‑side and client-side discovery patterns, service registry and its applications)
Peer discovery (peer discovery options, membership and failure detection problems, seed node, how gossip protocol works and its applications)
How to choose a network protocol (when and how to choose between TCP, UDP and HTTP)
Network protocols in real-life systems (quiz: what network protocol would you choose for various system design problems)
Video over HTTP (adaptive streaming)
CDN (how to use it, how it works, point of presence (POP), benefits)
Push and pull technologies (short polling, long polling, websocket, server-sent events)
Push and pull technologies in real-life systems (quiz: what technology would you choose for various system design problems)
Large-scale push architectures (C10K and C10M problems, examples of large-scale push architectures, the most noticeable problems of handling long-lived connections at large scale)
What else to know to build reliable, scalable, and fast systems (a list of common problems in distributed systems, a list of system design concepts that help solve these problems, three-tier architecture)
Timeouts (fast failures, slow failures, connection and request timeouts)
What to do with failed requests (strategies for handling failed requests (cancel, retry, failover, fallback))
When to retry (idempotency, quiz: which AWS API failures are safe to retry)
How to retry (exponential backoff, jitter)
Message delivery guarantees (at-most-once, at-least-once, exactly-once)
Consumer offsets (log-based messaging systems, checkpointing)
Batching (pros and cons, how to handle batch requests)
Compression (pros and cons, compression algorithms and the trade-offs they make)
How to scale message consumption (single consumer vs multiple consumers, problems with multiple consumers (order of message processing, double processing))
Partitioning in real-life systems (pros and cons, applications of partitioning)
Partitioning strategies (lookup strategy, range strategy, hash strategy)
Request routing (physical and virtual shards, request routing options)
Rebalancing partitions (how to rebalance partitions)
Consistent hashing (how to implement, advantages and disadvantages, virtual nodes, applications of consistent hashing)
System overload (why it is important to protect the system from overload)
Autoscaling (scaling policies (metric-based, schedule-based, predictive))
Autoscaling system design (how to design an autoscaling system)
Load shedding (how to implement it in distributed systems, important considerations)
Rate limiting (how to use the knowledge gained in the course for solving the problem of rate limiting (step by step guide))
Synchronous and asynchronous clients (admission control systems, blocking I/O and non-blocking I/O clients)
Circuit breaker (circuit breaker finite-state machine, important considerations)
Fail-fast design principle (problems with slow services (chain reactions, cascading failures) and ways to solve them)
Bulkhead (how to implement this pattern in distributed systems)
Shuffle sharding (how to implement this pattern in distributed systems)
The end (a list of topics that we will cover in the next module of the course)

Table of Contents

1 Introduction – Course Introduction
2 Introduction – Who will benefit from the course and how
3 Introduction – Course overview
4 How to define System requirements – System requirements
5 How to define System requirements – Functional requirements
6 How to define System requirements – High availability
7 How to define System requirements – Fault tolerance, resilience, reliability
8 How to define System requirements – Scalability
9 How to define System requirements – Performance
10 How to define System requirements – Durability
11 How to define System requirements – Consistency
12 How to define System requirements – Maintainability, security, cost
13 How to define System requirements – Summary of system requirements
14 How to achieve certain system qualities with the help of hardare – Regions, availability zones, data centers, servers
15 How to achieve certain system qualities with the help of hardare – Physical servers, virtual machines, containers, serverless
16 Fundamentals of reliable, scalable, and fast communication – Synchronous vs asynchronous communication
17 Fundamentals of reliable, scalable, and fast communication – Asynchronous messaging patterns
18 Fundamentals of reliable, scalable, and fast communication – Network protocols
19 Fundamentals of reliable, scalable, and fast communication – Blocking vs non-blocking IO
20 Fundamentals of reliable, scalable, and fast communication – Data encoding formats
21 Fundamentals of reliable, scalable, and fast communication – Message acknoledgement
22 How to improve system performance with caching – Deduplication cache
23 How to improve system performance with caching – Metadata cache
24 The importance of queues in distributed systems – Queue
25 The importance of queues in distributed systems – Full and empty queue problems
26 The importance of queues in distributed systems – Start with something simple
27 The importance of queues in distributed systems – Blocking queue and producer-consumer pattern
28 The importance of queues in distributed systems – Thread pool
29 The importance of queues in distributed systems – Big compute architecture
30 Data store internals – Log
31 Data store internals – Index
32 Data store internals – Time series data
33 Data store internals – Simple key-value database
34 Data store internals – B-tree index
35 Data store internals – Embedded database
36 Data store internals – RocksDB
37 Data store internals – LSM-tree and B-tree
38 Data store internals – Page cache
39 How to build efficient communication in distributed systems – Push vs pull
40 How to build efficient communication in distributed systems – Host discovery
41 How to build efficient communication in distributed systems – Service discovery
42 How to build efficient communication in distributed systems – Peer discovery
43 How to build efficient communication in distributed systems – How to choose a network protocol
44 How to build efficient communication in distributed systems – Network protocols in real-life systems
45 How to build efficient communication in distributed systems – Video over HTTP
46 How to build efficient communication in distributed systems – CDN
47 How to build efficient communication in distributed systems – Push and pull technologies
48 How to build efficient communication in distributed systems – Push and pull technologies in real-life systems
49 How to build efficient communication in distributed systems – Large-scale push architectures
50 How to deliver data reliably – What else to know to build reliable, scalable, and fast systems
51 How to deliver data reliably – Timeouts
52 How to deliver data reliably – What to do with failed requests
53 How to deliver data reliably – When to retry
54 How to deliver data reliably – How to retry
55 How to deliver data reliably – Message delivery guarantees
56 How to deliver data reliably – Consumer offsets
57 How to deliver data quickly – Batching
58 How to deliver data quickly – Compression
59 How to deliver data at large scale – How to scale message consumption
60 How to deliver data at large scale – Partitioning in real-life systems
61 How to deliver data at large scale – Partitioning strategies
62 How to deliver data at large scale – Request routing
63 How to deliver data at large scale – Rebalancing partitions
64 How to deliver data at large scale – Consistent hashing
65 How to protect servers from clients – System overload
66 How to protect servers from clients – Autoscaling
67 How to protect servers from clients – Autoscaling system design
68 How to protect servers from clients – Load shedding
69 How to protect servers from clients – Rate limiting
70 How to protect clients from servers – Synchronous and asynchronous clients
71 How to protect clients from servers – Circuit breaker
72 How to protect clients from servers – Fail-fast design principle
73 How to protect clients from servers – Bulkhead
74 How to protect clients from servers – Shuffle sharding
75 Epilogue – The end (but not quite

Homepage