This is partly a FAQ, but hopefully it goes beyond that…into a more
subtle FAQ, perhaps.
I understand that in general it is dangerous for haproxy to retry a
request once it has been sent to a server, for example after a timeout
or error, because the server may not be idempotent. I get this
objection.
However there are some backends that are designed to be idempotent, or
where the consequences of retrying an operation are less bad than the
consequences of clients timing out. I have servers supporting an AJAX
API over HTTP which are designed in this way, partly because HTTP client
retries can result in duplicate POST requests anyway.
It would be lovely if there was an option to retry in such situations,
with suitable caveats.
Edward
(Originally posted at
https://discourse.haproxy.org/t/retry-for-idempotent-backends/2896/2 but
it was suggested I bring it here.)
- Retry for idempotent backends Edward Hibbert
-