rest - Is it appropriate to return HTTP 503 in response to a database deadlock? -
is appropriate server return 503 ("service unavailable")
when requested operation resulted in database deadlock?
here reasoning:
- initially tried avoiding database deadlocks, ran across https://stackoverflow.com/a/112256/14731
- next, tried repeating request on server-side, ran across java servlets: how repeat http request?. technically speaking can buffer request entity scalability suffer , clients more see
503 service unavailable
anyway.
seeing as:
- it's easier ask clients repeat operation.
- they need able handle
503 service unavailable
anyway. - database deadlocks rather rare.
i'm leaning towards solution. think?
update: think returning 503 ("service unavailable")
still acceptable if wish it, no longer think technically required. see https://stackoverflow.com/a/17960047/14731.
i think it's fine long entire transaction rolled or if request idempotent.
Comments
Post a Comment