Reputation: 25
Does changing the timeout parameter in httpd.conf can effect the performance of ELB in AWS? I want to increase the timeout from 60 secs to 120 seconds in httpd.conf. I dont want anything abnormal happening to ELB once I change it.
Upvotes: 0
Views: 1540
Reputation: 3784
It will not affect the ELB in any way, but you will not get the desired effect. The ELB has a timeout of 60 seconds by default, if the instance behind it hasn't responded in this time the client will get a Gateway Timeout HTTP 504
from the ELB. So you need to increase also that ELB timeout to the same value to benefit from increasing your Timeout
on your web server. More details here: ELB Idle Timeout.
On the other hand if it is about the KeepAliveTimeout
from httpd.conf, this is something different. When you connect to your website through an ELB, this will open 2 connections: one with the client and one with the instance behind it where your web server is. And if you want to reuse those connections with your backend instance you need to set KeepAlive
to On
and the value of KeepAliveTimeout
+ Timeout
to be bigger than the Idle Timeout
from the ELB, so the ELB will be the one managing those reusable connections and not the backend instance. KeepAliveTimeout is the timeout after the request has been served to wait until to close the connection, so INMHO a value of 10-15 seconds will do. Also please note that putting KeepAlive to On
will decrease the CPU consumption - less connections to create, but it will increase the memory usage - you will have some alive connections just waiting for clients. More details on keep alive settings with ELB here.
Upvotes: 3