Streaming Twitch Microservices Live (Previously a monolith)
Chat went down so now its their own service
TLDR;
Twitch put everything on one server (Video, chat, search, everything). They got so big that they needed to migrate to microservices.
So they migrated to microservices.
What’s wrong with using a monolith?
It’s too big and slow. When everything depends on each other, it means breaking one thing breaks everything.
Scaling Struggles: Monoliths can't always grow parts separately, which can be a bummer when your app's blowin' up.
Slow-Mo Changes: At first, making moves in a monolith's like speed dating, but when it gets big, making changes can feel like slogging through molasses. One tweak can wreck the entire app.
Code Chaos: In a huge monolith, it's like tryna clean up a messy room with no storage. Things get tangled, and it's hard to keep the code in check.
Twitch went Live to Offline. What broke?
Twitch's chat system got super popular, and so did the outages.
Particularly chat.
Here’s what happened to chat:
The chat Problem
When twitch delivered their chatting feature, they had 8 machines distribute the traffic. This was back in 2010 and NONE of those machines were really beefy.
That means when someone got wildly popular and hit 20,000 viewers, they were all being served from a SINGLE machine. The sad part is that other smaller twitch streamers might also be hosted on that machine and have their streams compromised.
So Twitch was getting popular.
It was time to migrate to Microservices.
Keep reading with a 7-day free trial
Subscribe to Byte-Sized Design to keep reading this post and get 7 days of free access to the full post archives.