Assignment 1
Assignment 1
Task:
1. Case Study: The Cat Video Streaming Platform:
o Imagine you are building a cat video streaming platform (like Netflix for cats). The
platform must handle millions of users streaming cat videos simultaneously. Your task is
to design a system architecture that ensures:
▪ Fault Tolerance: The system should continue working even if some servers fail.
▪ Load Balancing: The system should distribute traffic evenly across servers to
avoid overload.
▪ Scalability: The system should handle a growing number of users and videos.
2. Design the System:
o Draw a rough architecture diagram of your system. Include the following components:
▪ Frontend: How users interact with the platform (e.g., web or mobile app).
▪ Backend: How videos are stored, processed, and delivered to users.
▪ Load Balancer: How traffic is distributed across servers.
▪ Fault Tolerance Mechanisms: How the system handles server failures (e.g.,
replication, consensus algorithms).
▪ Scalability: How the system scales to handle more users (e.g., auto-scaling,
distributed databases).
3. Write Pseudocode:
o Write pseudocode for the key components of your system. For example:
▪ How the load balancer distributes traffic.
▪ How the system replicates data to ensure fault tolerance.
▪ How the system scales up during peak traffic.
4. Document Your Work:
o Write a short explanation (1-2 pages) of your design, including:
▪ How your system ensures fault tolerance, load balancing, and scalability.
▪ Challenges you might face and how you would address them.
Deliverables:
1. Rough Architecture Diagram:
o A simple diagram showing the key components of your system (e.g., frontend, backend,
load balancer, databases).
o Use boxes and arrows to represent components and their interactions.
2. Pseudocode:
o Write pseudocode for the key components of your system (e.g., load balancer, fault
tolerance mechanism, scalability logic).
3. Short Explanation:
o A 1-2 page document explaining your design choices, how your system works, and how it
addresses the requirements (fault tolerance, load balancing, scalability).
Example Pseudocode:
// Load Balancer Pseudocode
1. Receive incoming request from user.
2. Check which server has the least load.
3. Forward the request to that server.
4. If a server fails, mark it as offline and redistribute its load to other servers.
// Scalability Pseudocode
1. Monitor server load in real-time.
2. If load exceeds 80%, spin up new servers automatically (auto-scaling).
3. Distribute new users to the new servers.
Grading Criteria:
1. Creativity: 40%
2. Clarity: 20%
3. Completeness: 30%
4. Documentation: 10%