Have you used flake ids before at a company? Have you ever had to globally identify billions of entities? How did you do it?
I often work at small scale, so self incrementing primary keys in DB or UUID as primary key serve me fine. Many years ago I was working at a company that had to globally identify clickstream events and that is where I was introduced to flake ids. We used a 64bit id for during that time.
I chose 128bit here to provide for 64bit milliseconds epoch, 48bit worker identifier (allowing for mac address) and 16 bits (65k ids) per millisecond for high throughput scenarios.
I'm not using this project and don't have any intention to, but I thought it was fun to do and to share :p
https://en.wikipedia.org/wiki/Snowflake_ID
To understand it better I created a fun weekend flake id generator using go!
https://github.com/turbolytics/flake
Have you used flake ids before at a company? Have you ever had to globally identify billions of entities? How did you do it?
I often work at small scale, so self incrementing primary keys in DB or UUID as primary key serve me fine. Many years ago I was working at a company that had to globally identify clickstream events and that is where I was introduced to flake ids. We used a 64bit id for during that time.
I chose 128bit here to provide for 64bit milliseconds epoch, 48bit worker identifier (allowing for mac address) and 16 bits (65k ids) per millisecond for high throughput scenarios.
I'm not using this project and don't have any intention to, but I thought it was fun to do and to share :p