1

I'm behind a proxy that is "Enterprise DDoS Protected". On a normal day with normal connections to all my servers the concurrent connections on the proxy is 17,000. Yes 17,000 is normal for the nature of my sites. 90% of the traffic is requesting bytes of data then that's it, no need to connect again for a minute. The problem with the "Enterprise DDoS Protected" proxy they are telling me if I would reduce my concurrent connections It will stop hanging up or have faster latency times. They have tuned it on there end but my servers seem to keep the connections open to long.

I'm running on my servers

Ubuntu Linux 11.10
Linux 3.0.0-17-server on x86_64
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz, 8 cores

on all my servers. My questions is how can I reduce the concurrent connections to where after it connects it closes the connection out like after 10 seconds on my servers?

6
  • What software is running on the server? If you need a timeout, it should be implemented there. Jul 15, 2012 at 20:04
  • Ubuntu Linux 11.10
    – Tabatha M
    Jul 15, 2012 at 20:05
  • I mean, what application software are the users connecting to? I'm not talking about the OS, I'm talking about the service you're providing. Jul 15, 2012 at 20:06
  • HTTP port 80 apache2
    – Tabatha M
    Jul 15, 2012 at 20:06
  • Ok - what is the HTTP server software that you're using? Jul 15, 2012 at 20:07

1 Answer 1

3

To force an HTTP keep-alive connection to close after a certain time in Apache, use the KeepAliveTimeout directive.

KeepAliveTimeout 5

Set this based on the expected time that the client needs to complete a set of requests to load a resource - you want to let the connection stay alive long enough for that to occur, then have the server close it when it's no longer needed. 5 seconds should be enough in most cases.

2
  • Also on the MaxKeepAliveRequests I had it set to 2. Now since I'm behind a protected proxy and the servers only see one IP should I set that to 0?
    – Tabatha M
    Jul 15, 2012 at 20:27
  • 0 makes it unlimited, but it'll still be limited by the timer - so either way is fine. Jul 15, 2012 at 20:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .