Using snowflake ids for posts and profiles
TL;DR: We are using snowflake ids as primary keys for posts and profiles as auto-incremented ids have many setbacks
Earlier this year we rolled out a new type of identifier for posts and profiles. Snowflake ids are unique ID numbers that scale across multiple app and database servers without requiring a central or distributed source.
We decided to make this change for the following reasons: – Scales better (supports region/datacenter and worker ids) – Better Privacy (more difficult to enumerate ids) – Ability to support over 10k ids per second across workers – Easier to order/sort compared to hashids/uuids/base62 – Supported for 69 years based on our epoch of February 2019
We look forward to adding snowflake id support to the rest of the code base in the coming months!
— Pixelfed Team