This is a platform for User Generated Content. G/O Media assumes no liability for content posted by Kinja users to this platform.


Simpleflake: Distributed Id-Generation for the Lazy

Our library, simpleflake, follows a similar pattern to Snowflake in that it is prefixed with a millisecond timestamp, but the remaining bits are completely random.

Random UUIDs are, well, random, so your data is scattered all across the btree (which is arguably the most common method of storage). If your access pattern is completely random, you probably won’t see a performance loss but usually this is not the case. For example. when you’re grabbing the freshest 100 rows for a user, having all required data in a few contiguous pages does wonders for reads.


Share This Story

Get our newsletter