Skip to main content
grammar
Source Link
user53019
user53019

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?

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 polls for the result.

I started with a simple 150ms 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 slower than 10 seconds.

Are there some formulars, statistics or algorithms, that I could use to dynamically optimize the polling time?

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 longer than 10 seconds.

Are there some formulas, statistics, or algorithms that I could use to dynamically optimize the polling time?

Source Link
K..
  • 596
  • 6
  • 18

Are there algorithims for polling optimization?

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 polls for the result.

I started with a simple 150ms 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 slower than 10 seconds.

Are there some formulars, statistics or algorithms, that I could use to dynamically optimize the polling time?