PlanetScale
PlanetScale logoPlanetScale · Feature trail

API Identifier Strategy

1 post · Mar 2022

What this trail covers

PlanetScale's API identifier strategy has evolved to use NanoIDs for public-facing identifiers. This decision was driven by the need for shorter, more user-friendly IDs compared to UUIDs, while maintaining a low probability of collisions and ease of generation across multiple programming languages. The implementation involves adding a `public_id` column to database schemas and using concerns in Rails and dedicated packages in Go to auto-generate these IDs. This approach enhances developer experience by making IDs easier to select and use in URLs.

All PlanetScale trails