How does YouTube handle millions of video notifications at once, while Discord can barely send out a couple thousand @everyone?

133 views

How does YouTube handle millions of video notifications at once, while Discord can barely send out a couple thousand @everyone?

In: 13

4 Answers

Anonymous 0 Comments

The real answer is optimization.

The same basic principle is the same, send out notifications, but that can be optimized, as others have mentioned a pub/sub model where they keep a list of the topics and who subscribes to them, and then send out messages, but it can also be optimized further.

Break those jobs up into smaller batches and have multiple servers send out those notifications, making something that 1 server would take 10 seconds, and have 10 servers do a 1 second job at the same time.

Things can be taken even further, and when it comes down to it, Youtube is much larger than discord so they can afford more servers to break those jobs into smaller and smaller batches, but also they have more money to spend on manpower for better optimization.

You are viewing 1 out of 4 answers, click here to view all answers.