Short Polling
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
Request is taking a while, I’ll check with you later
checking if this thing is done
Letting the backend handle it (aysnc), and it receives a response with some id, which it can use to send more requests to check if the job has been completed (and/or get some data)
A request takes a long time
uploading a large file
Backend wants to send a notificaiton
Client sends a request
Server responds immediately with a handle( id/callback)
but server can process it whenever
Server continues to process the request
Client uses that handle to check for status
Multiple “short” request response as polls
simple
Good for long runnign requests
client disconnects
can save request id from long running request, and can start up again (on app start up, or cron job)
Too chatty -> Increased network bandwidth
Especially with scaling, with one client is fine, but as the number of clients increase can overwhelm the server and bandwidth
Wasted backend resources
Instead of checking, it could have done other things