Tag

#api design

5 articles tagged #api design. See all tags →

An Idempotency Key Promises One Execution, Not Eventual Success
New
Tech··9 min

An Idempotency Key Promises One Execution, Not Eventual Success

The design detail that surprises people: Stripe caches the result of the first request under a key even when that result was a 500, and replays the failure to every retry. That is correct, and once you see why, the rest of the design follows, including where most homegrown implementations go wrong.

api designidempotencyreliability
Rate Limiting: The Algorithm Is the Easy Part
New
Tech··9 min

Rate Limiting: The Algorithm Is the Easy Part

Everyone compares token bucket to sliding window and stops there. The decisions that actually determine whether a rate limiter works are what you key it on, whether your Retry-After header is quietly scheduling a thundering herd, and whether a client that gets a 429 can safely retry at all.

api designrate limitingbackend
OAuth Is Not a Login System. And as of 2.1 There Is Only One Flow.
New
Tech··9 min

OAuth Is Not a Login System. And as of 2.1 There Is Only One Flow.

Two things would prevent most OAuth bugs. OAuth answers what a caller may access, not who they are, so using it to log people in is a category error. And the flow chart everyone agonised over has collapsed: authorization code plus PKCE, for every client type, no exceptions.

oauthoidcauthentication
If Your JWT Needs a Denylist, You Have Rebuilt Sessions With Extra Steps
New
Tech··9 min

If Your JWT Needs a Denylist, You Have Rebuilt Sessions With Extra Steps

JWTs are the default choice for new apps and usually the wrong one. The reason is revocation: there is no row to delete. And the standard fix, a server-side denylist, reintroduces the database lookup that was the entire point of going stateless.

authenticationjwtsessions