I have a web-application with an async. HTTP backend, which gets called by the client by AJAX requests. The client has to start a job and then polls for the result.
I started with a simple 150ms polling interval, which was fine for small jobs, but big jobs, which could take several minutes, threw many failed requests to the server.
Currently, I just add 1000ms to the delay after every poll, so the polling gets slower over time for longer requests, but never slowerlonger than 10 seconds.
Are there some formularsformulas, statistics, or algorithms, that I could use to dynamically optimize the polling time?