1)
Try to break the problem into simpler
modules ( Top down approach )
2) Talk about the trade offs
-
( No solution is perfect )
calculate the impact on system based on
all the constraints and the end test cases .
heproblem
←
Focus on interviewer 's
T ] intentions .
Ask
Abstract
questions
( constraints & ]
Functionality
Requirements )
finding bottlenecks
idudas
,System Design Basics ccontd ) ②
D Architectural pieces / resources available
2) How these resources work together
3) Utilization & Tradeoffs
consistent Hashing
-
f-
CAP Theorem ✓
-
Load balancing ✓
-
queues
-
caching -
Replication
I
-
-
59L vs No -
SQL
Indexes ✓
-
Proxies
-
Data Partitioning
✓
1-
, ③
Load Balancing
( Distributed system )
Random
f
Types of distribution -
Round -
robin
<
Random ( weights for &
memory
CPU
cycles)
To utilize full scalability & redundancy ,
add 3 LB
D User ¥ web server
2) Web server ¥ 1 Cache
App server Server
( Internal platform )
3) Internal platform DB .
#W
\er
Client LB
DB
T ,, LB
, Smart clients
Takes a pool of service hosts & balances load
→ detects hosts that are not responsive
→
recovered hosts
→
addition of new hosts
Load balancing functionality to DB ( cache Servic .
*
Attractive solution for developers
( small scale systems)
As system grows
→ LBS ( standalone servers)
Hardware load Balancers :
Expensive but high performance .
e.
g . Citrix Net scaler
Not trivial to configure .
Large companies tend to avoid this config .
or use it as 1st point or contact to their
to serve &
system user requests
Intra network uses smart clients / hybrid
solution → ( Next page) for
load balancing traffic .