Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REST Web Service and Keep-Alive

I'm setting up a web application, service oriented. The UI part (a web app) is consuming REST web services I'm coding too. So I have hand on both server and client side.

I was just wondering if it makes sense to set up HTTP keep-alive in such context. If it is, I'm curious as to why.

thanks in advance.

like image 989
Naoufel Avatar asked Nov 11 '12 16:11

Naoufel


1 Answers

Yes, it does! From my testing on my server I can get 300 calls per seconds to my REST web service without keepalive, over 2000 with the keepalive on.

You will have to do some analysis on the usage patterns - often user-driven usage comes in bursts so it makes sense to keep the keepalive timeout quite short, just to handle a single burst.

like image 186
thedayofcondor Avatar answered Sep 28 '22 10:09

thedayofcondor