3 ms·
Ask HN: Does YouTube store the hashid in the database?
I am wondering whether YouTube is storing the hashid as the primary key in the database or if they are hashing the key to obfuscate it. If they do store it, how do they generate it across so many different machines?
A simple solution would be to create a counter, however I would think that would cause a lot of locking?
I would like to use hashids across multiple machines as PK and not UUID, ULID, etc., but I want to actually store the hashid as the PK, but hashids are normally generated from a regular auto incremented ID.
So how do they do it?