System design Flashcards

1
Q

CDN (Content Delivery Network)

A

Definition: Distributed servers deliver content based on user location.

Pros: Reduces latency, handles traffic, improves UX, DDoS protection.

Cons: Can be costly, not for small/local apps.

Use: Speed up global content delivery.

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

CAP Theorem

A

Definition: In a distributed system, cannot have full Consistency, Availability, and Partition tolerance at once.

Use: Framework for understanding trade-offs in network partitions.

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

Redis

A

Definition: In-memory data structure store, used as database, cache, message broker.

Pros: Fast, rich data types, persistence, atomic ops.

Cons: Memory-bound, expensive scaling.

Use: Real-time processing, caching, sessions, leaderboards.

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

SQL vs NoSQL Databases

A

SQL: Relational, ACID, complex queries.

NoSQL: Scalable, flexible schema, various data types.

Use SQL: Transactional apps with complex queries.

Use NoSQL: Large data sets, real-time web apps.

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

Cassandra

A

Definition: Distributed NoSQL database for large data across many servers.

Pros: Scalable, fault-tolerant, tunable consistency.

Cons: Complex configuration, slower heavy reads.

Use: Write-heavy workloads, IoT, time-series data.

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

High Availability

A

Definition: System’s ability to be operational without significant downtime.

Use: Essential for mission-critical services.

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

Horizontal vs Vertical Scaling

A

Horizontal: Add more machines for growth.

Vertical: Upgrade existing machine’s power.

Use Horizontal: Systems that grow by machine addition.

Use Vertical: Upgrading machines is more viable.

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

Database Options and Tradeoffs

A

Options: MySQL, PostgreSQL, MongoDB, etc.

Tradeoffs: Consistency vs availability, complexity vs scalability.

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

Cloud Storage

A

Definition: Remote storage service accessible via internet.

Pros: Scalable, reliable, cost-effective.

Cons: Internet dependence, security concerns.

Use: Accessible storage, backup, web apps.

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

Partitioning

A

Definition: Dividing large tables into smaller pieces for manageability.

Use: Improve performance and availability of large databases.

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

Service-Oriented Architecture (SOA)

A

Definition: Architectural pattern where services are provided to other components by application components, through a communication protocol over a network.

Pros: Reusable business components, flexibility, scalability.

Cons: Can be complex, potential performance overhead.

Use: Systems that require integration of heterogeneous and legacy systems.

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

Distributed Software Systems

A

Definition: Systems in which components are located on different networked computers, which communicate and coordinate actions by passing messages.

Pros: Scalability, fault tolerance, resource sharing.

Cons: Complexity of process coordination, network latency.

Use: Applications where components can work on separate tasks simultaneously.

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

Caching

A

Definition: Storing copies of files in a cache, or temporary storage location, so they can be accessed more quickly.

Pros: Reduces database load, improves speed, decreases latency.

Cons: Complexity of cache invalidation, potential for stale data.

Use: High-traffic websites, applications where data retrieval speed is critical.

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

Load Balancing

A

Definition: Process of distributing network or application traffic across multiple servers to ensure no single server bears too much demand.

Pros: Reduces server load, increases availability and redundancy.

Cons: Can introduce complexity, single point of failure if not implemented correctly.

Use: Systems that require high availability and redundancy, handling of concurrent user requests.

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

Non-relational Databases

A

Definition: Databases not based on the relational model, storing data in a format other than tables.

Pros: Scalability, flexibility with unstructured data, quick iteration.

Cons: Lack of standardization, transactional support varies.

Use: Big data applications, content management systems, real-time analytics.

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

Microservices

A

Definition: Architectural style that structures an application as a collection of loosely coupled services.

Pros: Independent development and deployment, fault isolation, scalability.

Cons: Complexity of managing multiple services, inter-service communication overhead.

Use: Complex applications that require flexibility and scalability in development and deployment.

17
Q

Sharding

A

Definition: Data partitioning technique where a database is broken into smaller, faster, more easily managed pieces called shards.

Pros: Improved performance and manageability, horizontal scaling.

Cons: Increased complexity, potential for uneven data distribution.

Use: Databases with very large datasets and high transaction volumes.

18
Q

N-tiered Software Architecture

A

Definition: Software architecture where presentation, application processing, and data management functions are physically separated.

Pros: Scalability, maintainability, flexibility in development.

Cons: Can increase complexity and response time due to more layers.

Use: Complex applications where layers can be developed and scaled independently.

19
Q
A