Into AI

Into AI

How Twitter Generates Scalable Unique IDs For Its Tweets

Learn to design a unique ID generator & understand how Twitter's Snowflake works

Dr. Ashish Bamania's avatar
Dr. Ashish Bamania
Dec 03, 2023
∙ Paid
Share
A woolen art representation of the Twitter logo with a 2:1 aspect ratio. The artwork should feature soft colors, capturing the cozy and delicate texture of wool, with intricate threads and fibers forming the familiar bird shape of the Twitter icon.
Generated with DALL-E 3

Billions of events occur in massively distributed systems like Twitter/ Facebook/ Substack every day.

Each of these events needs to be tagged appropriately with a unique ID so that none of them go unnoticed and these are easy to debug in case an error occurs.

Let’s learn how to design a system to generate unique IDs for events and how Twitter’s Snowflake does it so well.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Dr. Ashish Bamania
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture