by maxloh · 2y ago · 0 comments
1) exposing in URLs (you can't scrape all data by iterating over IDs)
2) passing them around between microservices/systems (less confusion where an ID comes from when debugging/doing tech support, because you can check the ID in a few tables and be 100% sure that's exactly what you are looking for, because IDs are globally unique, unlike bigints)
3) useful in situations when data from several servers or DB shards is eventually aggregaged in one place (for example, for analytics) - with bigints you'd have collisions
Whether you should do anything else before the data has been persisted is a totally different discussion.
If you are doing async writes, as you alluded to, why bother with RDBMS in the first place? ACID is out the window.