0% found this document useful (0 votes)
55 views1 page

System Design Principles

Uploaded by

Hannah Grossman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views1 page

System Design Principles

Uploaded by

Hannah Grossman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

System Design Interview Cheat Sheet

Interview Framework
Step 1 10 min. Step 2 10 min. Step 3 10 min. Step 4 10 min. Step 5 5 min.

API

Understand the Problem High-Level Design Deep-Dive Improve the Design Wrap Up
Gather more information Explain how each part of the Examine system components Take a step back. What are Summarize the requirements,
about the system system works together.
in detail. Your interviewer the bottlenecks? How does it justify your decisions,
requirements and Start by defining APIs.
may pick a specific area or scale? suggest alternatives, and
constraints. They are the foundation of ask you what you’d like to answer any questions.
the architecture. explore.

API Design Choices


Explain how each part of the system works together. Start by defining APIs and the overall design patterns that your application will use.

REST RPC GraphQL Synchronous

Resource abc 0101 abc HTTP sync HTTP sync


Service
ProducerA Service B
Consumer
Client Producer Consumer

resource-
action-oriented single endpoint
oriented high performance strongly-typed

data-driven requests
Properties flexible no data
Async Messaging Message Message
overfetching Queue
self-documenting HTTP sync
Service
ProducerA Service B
Consumer
Client Producer Subscribe Consumer
Data JSON, XML, YAML,
JSON, XML, Thrift,
JSON
HTML, plain text Protobuf, FlatButters
web-based apps complex
high-
cloud apps microservices
performance
Publish
system mobile apps Publish-Subscribe Topic Subscribe
Use cases client-server apps IoT applications complex systems
Subscribe
cloud computing
and microservice-

services based architectures HTTP sync


Producer
Producer Consumer
Consumer Consumer
Consumer
developer APIs Client Producer Consumer Consumer

Scalability Caching
Consider the scale of your system. How many users and requests will the server support? What happens In-memory Cache Distributed Cache
with increased demand?

Replication Partitioning
Is the data important enough to make copies? Partitions contain a subset of the whole table.
How important is it to keep all copies the same? Each partition is stored on a separate server.
Sharing data / Сonsistency

Data Replication - data can be shared across


Latency - in-memory cache machines with a distributed
is faster because it doesn't cache.
require a network request
like distributed. Availability - distributed
Active Data Mirrored Data Vertical Partitioning cache is not affected by
individual server failures.
Horizontal Partitioning
Sharding No. item
Cache Miss & Hi
Eviction
Sharding allows a system to scale as data LRU (Least Recently used
increases, but not all data is suitable for sharding. Load Balancing Disk & Memory Usage LFU (Least Freq. used
Load balancing distributes incoming traffic across FIF
multiple servers or resources. Write-Throug
MR
Collection 1 Random Evictio
Image
Read-Throug
11
T1
1
B
Processor Write-Aroun Least Use
On-Demand Expiratio
TTTBBB Write-Back
Garbage Collection
Image

Upload
Load
Processor Popular caches
Service Balancer In-memor Storing user session
Communication
Redi
Shard 1 Shard 2 Shard 3 Shard 4 Image
Memcache between microservice
Processor Caching frequent

2516

2516

2516

2516

AWS Elasticach database lookups


GTBB GTBB GTBB GTBB GCP Memorystore
tryexponent.com

You might also like