Global username uniqueness at signup
Your task
Design the username/handle reservation service for a platform with 300M users where signups can hit any of several regional API endpoints. The hard requirement: a username is globally unique, two people signing up at the same instant in different regions must never both get '@alex'. Signups are bursty but modest (hundreds/sec); reads (is this handle taken / profile lookup) are heavy and can be slightly stale. How do you guarantee uniqueness without making the whole system synchronous?
It covers
- Linearizability
- Compare and swap
- Uniqueness