All problems
Advanced·⚙️ Infrastructure·Twitter (Snowflake) · Instagram · Discord

Design
Distributed Unique ID Generator (Snowflake-like)

Design a service that generates globally unique, roughly time-sortable IDs across many machines without coordination.

This is a Low-Level Design (LLD) problem. New to LLD vs HLD? Start here.

#Distributed Systems#Algorithms
5F + 3NF requirements inside

01 -  Why interviewers ask this

It's the canonical "design Twitter Snowflake" question — interviewers check whether you understand how timestamp+machine-id+sequence bit-packing avoids any central coordination.

02 -  Where this system exists in the real world

You interact with this design every day.

Twitter Snowflake-style distributed ID generation

Distributed database primary key generation

Order/transaction ID generation at scale

03 -  What you'll master

Solve this once. Know it forever.

01

Bit-pack timestamp, machine ID, and sequence

02

Avoid central coordination for ID generation

03

Handle clock-drift edge cases correctly

04 -  What you'll design

5 functional · 3 non-functional requirements.

Generate a unique ID with no central coordination required per request

4 more requirements inside

Sign in to unlock the full brief and start designing

05 -  Companies that ask this

You may face this exact question in your next interview.

T
Twitter (Snowflake)
I
Instagram
D
Discord

Ready?

Open the canvas.
Design it yourself.

See all requirements, use staged hints, run your code, and compare with community discussions - all on the same canvas.