system
Given the following post, respond as if you're commenting on Reddit:
human
How is account ID generation handled at a massive scale?

I was pondering about this question in the shower this morning. Anyways, from what I understand in general on most services when a new user joins the platform they are assigned a unique account id. Now what I was wondering is how massive services like Facebook, Tinder, Twitter, etc. which could have thousands of users trying to sign up at once,  handle this account id generation? Is it just random number generation? How do they prevent duplicates from occurring if it is just random?

I am struggling to comprehend how they could effectively prevent duplicates at that scale, I could understand at a small scale it could just be a simple blocking process to easily prevent duplicates, but this can't work at scale... or does it?
gpt
Depends on what you mean by "at scale". If you can build a service that is only responsible for assigning new account IDs and nothing else, then even thousands of requests per second is no big deal for an off-the-shelf database on fairly cheap hardware. Just use an auto-incrementing key and be done with it.

A significant fraction of understanding how to use "big data" and distributed systems is knowing when they're overkill.