We are developing a service that needs to respond within 50ms AND it needs a good SLA, i.e. must always be live and responsive.
Question – is it possible to set a default response (e.g. respond with blank JSON object) to use in case of web server (nginx or Apache) timeout? If so – how to do this?
I could add this to the application logic but setting it at the server level would be more fail-proof.
You can use the
error_pagedirective.E.g.: