1 Comment
User's avatar
Martin Griggs's avatar

Great read, though I do feel like the key generation could be done slightly more efficiently. Generating trillions of keys ahead of time for a scale the service might reach in the future seems a little excessive. Instead, an algorithm like Snowflake IDs could achieve the same, at 8 bytes in size, and without risk of collisions. You'd shed the complexity of sharding your database, which you'll probably never need to reintroduce because the assumption that a few links will account for most of the traffic will probably hold true. Wouldn't it be an overall improvement not to have a huge pre-existing keys table?

Expand full comment