3 ms·
> You seem to know about their architecture. What do they do now? Random 64-bit primary keys in mysql for newer videos. These may sometimes collide but then I
by quantumofalpha 5y ago
> You seem to know about their architecture. What do they do now?
Random 64-bit primary keys in mysql for newer videos. These may sometimes collide but then I suppose you could have the database reject insert and retry with a different id.
- slver 5y agoSo a single cluster produces those keys? I thought it’s more decentralized.
- quantumofalpha 5y agoWith random database keys I would think they can just be generated at random by any frontend server running anywhere. Ultimately, a request to insert that key would come to the database - which is the centralized gatekeeper in this design and can accept or reject it. But with replication, sharding, caching even SQL databases scale extremely well. Just avoid expensive operations like joins.