4 ms·
That's one valid use of an idempotency token. Also e.g. POST submission of an order or transaction. But these are implementation-specific, and available (and i
by quesera 5y ago
That's one valid use of an idempotency token. Also e.g. POST submission of an order or transaction.
But these are implementation-specific, and available (and in active use) today under a few common HTTP header names.
It's not clear why the header name should be standardized.
You could move idempotency implementation up to the load balancer or the proxy layer. I'm not convinced that would be useful, because to implement the hard parts of idempotency (esp across instances), you'd need to add a bunch of extra complexity there, which is already a committed cost at the application layer.
But if, say, haproxy or nginx release a new distributed idempotency caching feature, maybe that would change my mind.
- ec109685 5y agoAll that layer really needs to do is support caching objects. When response is returned, cache based on idempotent cache key, and on subsequent requests, lookup that value before making downstream requests. Also, should extend the key’s value with an unguessable session id, so folks can’t can’t guess the key and read someone else’s data.
- quesera 5y agoYep, but that idempotency caching layer would need to share keys across all instances, possibly even geographically. This is a solved problem at the application layer of course, but adding complexity at the higher (LB or proxy) layer ... well, adds complexity there and the benefit is not clear to me.