Basics 2 Flashcards

Design Notification System (email/SMS push) Design a Caching System (e.g., using Redis) Design a Key-Value Store (like Redis) Design a Message Queue (like Kafka-lite) (56 cards)

1
Q

What is a Notification System?

A

A system that sends messages to users through various channels like email, SMS, or push notifications.

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

What are the advantages of a Notification System?

A

Enhances user engagement, provides timely information, and supports multiple communication channels.

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

What are the disadvantages of a Notification System?

A

Can be intrusive if overused and requires handling user preferences and delivery failures.

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

What are best practices when designing a Notification System?

A

Implement user preferences, retry mechanisms, and support for multiple channels.

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

What are common use cases for a Notification System?

A

Order confirmations, alerts, reminders, and promotional messages.

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

How does a Notification System impact system design?

A

Requires integration with third-party services, handling asynchronous processing, and ensuring message delivery.

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

Give an example of a Notification System.

A

Services like Twilio, Firebase Cloud Messaging, and Amazon SNS provide notification capabilities.

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

What are the architectural components of a Notification System?

A

Includes message queues, worker services, channel-specific gateways, and user preference management.

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

How can performance be ensured in a Notification System?

A

Use asynchronous processing, scalable infrastructure, and efficient queuing mechanisms.

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

How can fault tolerance be added to a Notification System?

A

Implement retries, fallback channels, and monitor delivery statuses.

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

How is monitoring and debugging handled in a Notification System?

A

Track delivery metrics, bounce rates, and user engagement; log errors for analysis.

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

What is a real-world tradeoff in Notification Systems?

A

Balancing timely delivery with user preferences and avoiding notification fatigue.

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

What is a common interview question on Notification Systems?

A

Design a notification system supporting email, SMS, and push—how would you handle retries and user preferences?

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

What is a potential gotcha in Notification Systems?

A

Failing to manage user preferences can lead to compliance issues and user dissatisfaction.

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

What is a Caching System?

A

A system that stores frequently accessed data in a temporary storage layer to improve performance.

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

What are the advantages of a Caching System?

A

Reduces latency, decreases load on primary data stores, and improves application responsiveness.

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

What are the disadvantages of a Caching System?

A

Can lead to stale data if not managed properly and adds complexity to data consistency.

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

What are best practices when designing a Caching System?

A

Implement appropriate eviction policies, use TTLs, and ensure cache consistency with the data source.

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

What are common use cases for a Caching System?

A

Database query results, session data, and frequently accessed resources.

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

How does a Caching System impact system design?

A

Requires consideration of data consistency, cache invalidation strategies, and memory management.

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

Give an example of a Caching System.

A

Redis and Memcached are popular in-memory caching systems.

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

What are the architectural components of a Caching System?

A

Includes cache servers, client libraries, and integration with application logic.

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

How can performance be ensured in a Caching System?

A

Use in-memory storage, optimize cache hit rates, and monitor cache performance metrics.

24
Q

How can fault tolerance be added to a Caching System?

A

Implement replication, use distributed caching, and have fallback mechanisms to the primary data store.

25
How is monitoring and debugging handled in a Caching System?
Monitor cache hit/miss ratios, eviction rates, and latency; log cache-related errors.
26
What is a real-world tradeoff in Caching Systems?
Balancing cache freshness with performance; stale data can lead to inconsistencies.
27
What is a common interview question on Caching Systems?
Design a caching layer for a high-traffic website—how would you handle cache invalidation and consistency?
28
What is a potential gotcha in Caching Systems?
Improper cache invalidation can lead to serving outdated or incorrect data.
29
What is a Key-Value Store?
A database that uses a simple key-value method to store data, allowing for fast retrieval.
30
What are the advantages of a Key-Value Store?
High performance, scalability, and simplicity in data storage and retrieval.
31
What are the disadvantages of a Key-Value Store?
Limited querying capabilities compared to relational databases and potential data redundancy.
32
What are best practices when designing a Key-Value Store?
Use consistent hashing for data distribution, implement replication, and handle data persistence appropriately.
33
What are common use cases for a Key-Value Store?
Session management, caching, user profiles, and configuration management.
34
How does a Key-Value Store impact system design?
Influences data modeling, consistency strategies, and system scalability considerations.
35
Give an example of a Key-Value Store.
Redis, Amazon DynamoDB, and Riak are examples of key-value stores.
36
What are the architectural components of a Key-Value Store?
Includes data storage nodes, replication mechanisms, and client interfaces for data access.
37
How can performance be ensured in a Key-Value Store?
Optimize data access patterns, use in-memory storage, and distribute data evenly across nodes.
38
How can fault tolerance be added to a Key-Value Store?
Implement data replication, use consensus algorithms, and design for partition tolerance.
39
How is monitoring and debugging handled in a Key-Value Store?
Monitor read/write latencies, replication status, and node health; log errors for analysis.
40
What is a real-world tradeoff in Key-Value Stores?
Choosing between consistency and availability, especially in distributed systems.
41
What is a common interview question on Key-Value Stores?
Design a distributed key-value store—how would you handle data partitioning and replication?
42
What is a potential gotcha in Key-Value Stores?
Handling large values or objects can be challenging and may require additional strategies.
43
What is a Message Queue?
A communication method used in distributed systems where messages are stored in a queue until they are processed by a consumer.
44
What are the advantages of a Message Queue?
Decouples services, enables asynchronous processing, and improves system scalability and reliability.
45
What are the disadvantages of a Message Queue?
Adds complexity to the system, potential message duplication, and requires handling message ordering.
46
What are best practices when designing a Message Queue?
Ensure idempotent message processing, implement retry mechanisms, and monitor queue lengths.
47
What are common use cases for a Message Queue?
Task scheduling, event-driven architectures, and inter-service communication.
48
How does a Message Queue impact system design?
Influences service decoupling, fault tolerance strategies, and system throughput considerations.
49
Give an example of a Message Queue.
Apache Kafka, RabbitMQ, and Amazon SQS are examples of message queues.
50
What are the architectural components of a Message Queue?
Includes producers, consumers, brokers, and storage mechanisms for message persistence.
51
How can performance be ensured in a Message Queue?
Optimize message serialization, use efficient network protocols, and scale brokers horizontally.
52
How can fault tolerance be added to a Message Queue?
Implement message replication, use acknowledgments, and design for broker failover.
53
How is monitoring and debugging handled in a Message Queue?
Monitor message throughput, queue lengths, and consumer lag; log processing errors.
54
What is a real-world tradeoff in Message Queues?
Balancing message durability with system performance; persistent messages may reduce throughput.
55
What is a common interview question on Message Queues?
Design a message queue system—how would you ensure message delivery guarantees and ordering?
56
What is a potential gotcha in Message Queues?
Failure to handle message duplication can lead to unintended side effects in consumers.