A likes counting system tracks and displays the number of likes (or reactions) on content such as posts, videos, comments, and photos across social media platforms.
The core challenge is deceptively simple: when a user taps the "like" button, increment a counter and display the updated count. But at the scale of platforms like Facebook, Instagram, or YouTube, where billions of likes happen daily, this becomes one of the most challenging distributed systems problems.
Popular Examples: Facebook reactions, Instagram likes, YouTube likes, Twitter/X likes, Reddit upvotes
In this chapter, we will explore the high-level design of a likes counting system.
This problem tests your understanding of high-throughput writes, eventual consistency, caching strategies, and handling viral content.
Lets start by clarifying the requirements: