System Design Flashcards

Master Template

1
Q

DNS (Domain Name System)

A

phonebook for the internet. domain is sent in query to recursive resolver which provides the IP address.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is a load balancer?

A

distribute network traffic. ensure optimal resource utilization, reduced latency, high availability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

round robin (load balancer)

A

requests are sequentially and evenly distributed across all available servers in a cyclical manner

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

least connections (load balancer)

A

assigns requests to the server with the fewest active connections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

IP Hash (load balancer)

A

client’s IP is hashed, the result decides which server the request is directed to. this method ensures that the same user ends up on the same server, helping maintain session persistence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

API Gateway Functions

A

Request Routing
Authentication and Authorization
Rate Limiting
Caching
Request and Response Transformation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Authentication vs Authorization

A

Authentication is verifying identity, usually based off a token.
Authorization is verifying what actions a user has based off their role.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Content Delivery Network (CDN)

A

distributed network of servers that store and deliver content (images, videos, scripts) to users from locations that are geographically closer to them.
request for content->check local server->if cached, return->else check other local servers or origin->cache locally and serve content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

sharding

A

dividing the rows of a table into smaller tables and storing them on distinct servers or database instances. This method is employed to distribute the database load across multiple servers, thereby enhancing performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

vertical partitioning

A

splitting the columns of a table into separate tables. This technique aims to reduce the column count in a table and boost the performance of queries that only access a limited number of columns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Database Replication

A

The main objective of database replication is to enhance data availability, redundancy, and fault tolerance, ensuring the system remains operational even in the face of hardware failures or other issues. Primary database + many replicas.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Distributed Messaging Systems

A

These systems facilitate communication by decoupling sender and receiver components, enabling them to develop and function independently. provide a reliable, scalable, and fault-tolerant means for exchanging messages between numerous, possibly geographically-dispersed applications, services, or components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Microservices

A

loosely coupled independent functions. SRP. independence, decentralized, communication via REST/gRPC. fault tolerant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

NoSQL datbases

A

unstructured or semi-structured data. flexible and scalable. document based(MongoDB): JSON.
Key-Value (DynamoDB): best for read/write and scaling horizontally.
Column-Family (Cassandra): groups of related columns. best for write-heavy workloads and queries with known row/column keys.
Graph-Based (Neptune): complex relationships like social networks or recommendation systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Database Index

A

enhance speed of query operations. provide a direct route to data in the table without searching. implemented using a b-tree. tradeoff: additional storage space, write performance (have to update indices)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Heartbeat

A

detection system for servers to ensure they are alive and functioning. periodically send message to central server or group of servers. if no message during timeout period, assume server is dead and stop sending requests.

17
Q

checksum

A

verifies data wasn’t corrupted along the way. use hashing algorthm like MD5 or SHA-256.

18
Q
A