Generate IDs outside DB for high scale.
At a large scale, DBs can no longer generate their own IDs. Cassandra operates at a scale where it doesn’t even have a default option since each implementation needs to be so particular. Autoincrement IDs don’t work when distributed, and UUIDs are too random to efficiently paginate through IDs when sharding. Twitter assigns an ID from a central service to a new action the moment it enters the ecosystem.rC5
-
↩
Rob Conery, “A Better ID Generator For PostgreSQL,” Rob Conery, May 29, 2014, http://rob.conery.io/2014/05/29/a-better-id-generator-for-postgresql/. (See notes.)