UUID Killed REST
2025-04-21
๐ค "From a practical standpoint..." โ A small question that turned into a whole thing
I was implementing a coding test assignment using an in-memory approach.
The goal was to satisfy the requirements first and then ask myself,
โIf I were building this for real, how would I design it?โ
There was no FastAPI, no SQLAlchemy, no database.
Just pure Python logic.
And naturally, I was assigning primary keys like this: customer_id_seq += 1,
mimicking auto-increment behavior.
Then GPT dropped this on me:
๐ค From a practical standpoint:
โโโข Real-world services often use UUIDs
โโโข Or ULID/Snowflake IDs for time-sortable uniqueness
โโโข Using incrementing integers like this is a typical in-memory simulation pattern
The part about "mimicking" didnโt bother me. It was true.
If I were building this in production, Iโd use MySQL and AUTO_INCREMENT.
So yes โ itโs mimicry. No argument there.
But what stuck with me was the next part:
โIn real services, UUIDs are commonly usedโฆโ
Are they really?
Why? For security? For structure?
And more importantlyโฆ
Is putting a UUID directly in a URI ever really a beautiful design?
That question was the beginning.
From that moment, I began facing the concept of UUID head-on.
Is UUID security?
Letโs start there.
A lot of people say they use UUIDs for โsecurity.โ
Instead of predictable paths like /users/42, they go with something like:
/users/8c12e401-ef14-4ea4-86cd-349fc00c672b/profile
โ because itโs โhard to guess.โ
But hereโs what I believe:
Security in your URIs should come from authorization, not obfuscation.
What if someone brute-forces a real UUID?
And what if that request goes through without authentication?
Then the problem isnโt the UUID.
Itโs your security model.
A UUID isnโt protection.
Itโs just a name tag thatโs harder to guess.
UUIDs are not beautiful in URIs
Whenever I see a UUID in a URI, this is what goes through my mind:
โAh shitโฆ here we go againโฆโ
RESTful URIs are meant to be readable by humans.
Something like /users/42/profile has structure, clarity, and meaning.
(My blog isnโt even RESTful yet โ it's still https://cliche.life/profile/cliche โ
but the point is: the structure is human-readable.)
Now compare that to this:
/users/8c12e401-ef14-4ea4-86cd-349fc00c672b/profile
It looks like a pile of machine vomit.
No readability.
No sorting.
No predictability.
Just chaos.
Youโve seen those links, right?
The ones your friend DMs you that are so long, you need to hit โSee Moreโ to even unfold the full URL.
Let me give you an example:

Strictly speaking, this isnโt a UUID.
Itโs a mess of UTM params, tracking tags, and product data.
But from the perspective of โhuman-unreadable design,โ
itโs exactly the same.Once again โ my apologies to Yodobashi.
RESTโs original philosophy was about expressing resource structure through URIs.
UUIDs cut right through that.
REST is dead.
What remains is just a random-token-flavored RPC.
So... are UUIDs garbage?
No. Absolutely not.
UUIDs are useful.
Especially in distributed systems, offline ID generation, or client-side uniqueness.
I respect all that.
But what I am saying is this:
Donโt use UUIDs for security.
Donโt make UUIDs the face of your architecture.
And most of all โ
UUIDs are not RESTful.
URIs should be readable by humans.
Thatโs what REST was about โ and what brought me to this work in the first place.
If I can't understand a structure, it has no value to me
This isnโt just a UUID rant.
Itโs a statement about how I approach technology.
I hate unnecessary complexity.
If I built the system, I need to be able to understand the structure.
Thatโs the foundation of design.
And the beginning of ownership.
These days, people build apps with no-code tools,
deploy with a single click,
and talk about monetizing before they even write a function.
But I always come back to this:
โIf I canโt understand the system, itโs not mine.โ
Itโs a rental structure.
And Iโm just a user who canโt change a single line of it.
Conclusion
UUIDs are not security.
URIs should be readable.
I still use profile/{username} โ
because that structure is mine.
It makes sense to me.
Itโs human. Itโs elegant.
RESTful? Sure, I like it.
But itโs a means, not a religion.
In the end, design is only beautiful when it works.
So I cleaned up my RESTful endpoints and HTTP methods,
only to realize that HTML forms donโt even support DELETE or PATCH.
If RESTful is the ideal,
then Swagger is my day-to-day reality โ
one test at a time, one click at a time.
Yes, I wish my URIs could be beautiful.
But what matters most is this:
I need to understand the URI I create.
Thatโs my philosophy.
And itโs still breathing today โ in profile/{username}.
Kakao
Google
Naver