DEV Community

Alex Rudenko
Alex Rudenko

Posted on

1

How do you handle client timeouts?

You have an endpoint which does some valuable computations, and it's supposed to answer within say 3000 ms. Therefore, the client has 3000 ms as the timeout setting for the request. For whatever reason, some % of requests started to take 6000ms. What happens now is that execution continues after the client disconnects. The result is then just discarded.

The question is: how do you deal with it (if at all) using your current technology? Do you abort the computations and how do you do it?

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay