5. Scale from ZERO to MILLION Users in Detailed | System design interview: Scale to 1million users

preview_player
Показать описание
In this Video, i talked about scalability, and how to grew a website to handle 1 million users. I cover load balancing, content delivery networks, database master/slave replication, horizontal/vertical sharding, and more.

To appreciate the work, pls join:

#cdn #sharding #hld
Рекомендации по теме
Комментарии
Автор

### **Introduction:**

- This video is part of a series on system design concepts, focusing on scaling from 0 users to 1 million users.
- Covers various concepts like sharding, horizontal and vertical scaling, load balancing, caching, and messaging queues.

### **Steps for Scaling:**

1. **Single Server:**
- Basic setup with a single server for the application, database, and client.
- Suitable for the initial stage with zero users.
2. **Application and Database Separation:**
- Introduces a separate layer for the application server, handling business logic.
- Database server handles data storage and retrieval.
- Enables independent scaling of both application and database.
3. **Load Balancing and Multiple Application Servers:**
- Introduces a load balancer to distribute incoming requests across multiple application servers.
- Load balancer provides security and privacy.
- Ensures efficient handling of increased traffic by distributing workload.
4. **Database Replication:**
- Implements a master-slave configuration for the database.
- Master database handles write operations, while slave databases handle read operations.
- Improves performance and provides redundancy in case of database failure.
5. **Caching:**
- Utilizes a caching layer to store frequently accessed data in memory.
- Application server checks the cache first before accessing the database.
- Reduces database load and improves response time.
- Uses time-to-live (TTL) to manage cached data expiry.
6. **Content Delivery Network (CDN):**
- Uses a distributed network of servers to cache static content closer to users.
- Reduces latency and improves website performance for users worldwide.
- Handles requests for static content like images, videos, and JavaScript files.
- In case of cache miss, CDN first ask neighbour CDN for the data then from origin DB.
7. **Multiple Data Centers:**
- Distributes the application and database across multiple data centers.
- Reduces load on individual data centers and improves reliability.
- Enables geographically distributed user access with minimal latency.
- Load balancer distributes requests to different data centers based on user location.
8. **Messaging Queues:**
- Uses messaging queues to handle asynchronous tasks like sending notifications or emails.
- Decouples tasks from the main application flow.
- Improves performance and reliability by handling high-volume tasks efficiently.
- Utilizes messaging platforms like RabbitMQ or Kafka.
9. **Database Scaling:**
- **Vertical Scaling:** Increase the capacity of existing database servers (CPU,  RAM). This has limitations and eventually reaches a ceiling.
- **Horizontal Scaling / Data Sharding :** Split the database into multiple servers or shards, distributing data across them.
- Splits data across multiple databases or tables based on a specific key.
- Can be implemented through vertical sharding (splitting columns) or horizontal sharding (splitting rows).

arimardanyadav
Автор

I seen LLD & HLD in language but couldn't grab it.... because there directly they were discussing on the solution. But the way you went from 0 -> N that was amazing. I worked in monolith application but couldn't understand how to approach to the best Hats of to you....your teaching method.... More Power to you !!!

vishalwagh
Автор

in love with all the videos !! curiously waiting for the consistent hashing topic, please drop it soon 🙂

harshgupta
Автор

Amazing content☺ on LLD and HLD. I was finding difficulty in answering about the design patterns in the interview, but the roadmap of LLD and HLD explained here really helped.

afeeramehnaz
Автор

One of the best video on step-wise scaling!

tech_knocking
Автор

This stuff is really really cool, and Thank you so so much for sharing your knowledge. Appreciated. :)

renuroy
Автор

Honestly, this is one of the fine grained system design lectures I have ever seen! I paid for udemy courses, looked for freecodecamp videos, medium blogs, but this is the finest of all gems! Thanks a lot! You deserve a lot lot lot!

omkardeshpande
Автор

Maja aa gya, Love this video (y). Thank you so much

PadamAgrawal
Автор

Liked the step-by-step scaling explanation. Pls make more such videos so that we can find them all here.

anonymous
Автор

Great content, keep it up
You have earned a new subscriber

prashantgupta
Автор

That is really cool to see such incremental approach. Appreciate this video.
Could you please also make an extension of this video mentioning, Elastic Search Engine.

anjumanislamiachhatarpur
Автор

Very nice tutorial. Provided detailed information in very short time. thank you

bittu
Автор

Great content! It would be helpful if you could include any references you used, such as articles, blogs, or books in descriptions

anojk
Автор

Thank you for your service. Great job.

jackeysharath
Автор

Amazing content + highly recommended to watch it.

mahesh_kndpl
Автор

Best video I have ever seen. Thanks so much

shivanshugupta
Автор

I was from an electrical branch, SO I didn't do that project, nor having learned of any computer science project. But now I am gaining it

goyaldeekshant
Автор

0:00 - Introduction
1:19 - Single Server
2:28 - Application & DB Separation
3:50 - Load Balancer & App Servers
6:25 - Database Replication
9:01 - Cache Integration
10:40 - CDN (Content Delivery Network)
18:32 - Data Center Scaling
21:44 - Messaging Queues
28:16 - Database Sharding
34:19 - Conclusion

RandomGuy-hijm
Автор

Thanks for such amazing content bro. It would be great if you could please share resources like Books, blogs etc from where you learned all this, so that if someone wants they can go into greater details!!

vaibhav
Автор

So clean and sophisticated explaination

willtank