All questions
Q & A Developer · September 11, 2026

Can I use UUID as a primary key?

Yes — and it’s a valid choice with trade-offs. Pros: (1) generated client-side, no server coordination; (2) not sequentially guessable (URL security); (3) globally unique across sharded databases. Cons: (1) 16 bytes vs 4-8 for a sequential integer; (2) UUIDv4 causes B-tree index fragmentation from random insert order. Use UUIDv7 to eliminate the fragmentation issue — v7’s timestamp prefix makes inserts append-mostly. For high-traffic databases, benchmark UUIDv7 vs sequential ID vs Snowflake-style IDs. For most applications, UUIDv7 primary keys are the right modern default. Generate them with the UUID generator.

Read the full guide
What Is a JWT?
JWT (JSON Web Token) is the dominant format for API authentication, OAuth access tokens, and stateless session management. Three base64-encoded segments carry the header, claims, and signature — anyone can read them, but only the key holder can produce a valid token.