Professional Documents
Culture Documents
System Design
Concepts
Read/Writes
MASTER
Client Replication
Reads
Slave
Client
Reads
Slave
Client
Interview Edition
*Disclaimer*
System Design is the most asked topic in tech
interviews.
grows.
becoming unavailable
Ex:RDBMS(Oracle SQL Server MySQL)
Ex: MonogoDB Hbase
As it entails distributing
It involves the Actor model:
jobs among devices over a
Multi-threading and in-
network is known as
process message
distributed programming.
Concurrency forwarding are frequently
Several patterns are
used to implement
Models
connected to this model:
concurrent programming
MapReduce, Master/
on multi-core platforms.
Worker*, Blackboard, and
many spaces.
reference in a multi-threaded
Passing space. Since you will send
scenario since it is
copies of the data, it also
reasonable to presume that
increases the cost of
there is a shared address
sharing, transferring, or
space.
updating data.
S Transaction Support:
SOAP: Provides advanced support for transactions.
REST: Limited transaction support.=
S Bandwidth/Resource Usage:
SOAP: High bandwidth due to XML data overhead.
REST: Uses less bandwidth.=
immediate availability.
Sharding:
S Definition: A specific type of horizontal partitioning where
data is distributed across multiple separate servers.
Location: Each partition (shard) resides on a dedicated
server.
integrity is crucial.
3. Weak Consistency:
outdated data.8
consistency.8
User Experience:
L Apdex Score: Blends response time and success rate for
user satisfaction.A
L Average Response Time: How long it takes the system to
answer user requests.
System Health:
L Throughput: Number of requests handled per unit of time
(helps determine scaling needs).A
L Availability/Uptime: Percentage of time the system is
operational.A
L Error Rates: Frequency of errors encountered during
operation.
Resource Utilization:
L Latency & CPU: Monitors data transfer speed and CPU
usage to identify bottlenecks.A
L Garbage Collection: Tracks memory management
efficiency.
Others:
optimal operation..
system security.
Question-12
Write-around:
s Writes bypass the cache and go directly to the database.l
s Pros: Potentially lower write latency.l
s Cons: Increased cache misses, leading to higher read
latency for frequently written and re-read data.
Write-back:
+ Writes occur only in the cache, confirmed immediately. Data
is asynchronously synced to the database later.$
+ Pros: Lower write latency, higher throughput for write-
intensive workloads.$
+ Cons: Risk of data loss if the cache crashes before syncing.
Improved reliability with multiple write acknowledgements.
Question-13
¨y Token Bucket:
Requests require tokens
from a bucket for processng.
Refuses requests if no tokens
are available, refreshing
the bucket over time.
) Fixed Window:
Requests exceeding a
are discarded.
P) Sliding Log:
Requests exceeding a
are discarded.
P) Sliding Window:
approaches.
be difficult.
Bosscoder?
750+ Alumni placed at Top
Product-based companies.
Explore More