Implement HTTP keepalive without killing your apache server

You can make use of HAProxy to add HTTP keepalive support to your website, and it will not kill your Apache server as each request make use of individual connection.

frontend public
	bind :80             # or any other IP:port combination we listen to.
	option http-server-close
	default_backend apache
backend apache
	# set the maxconn parameter below to match Apache's MaxClients minus
	# one or two connections so that you can still directly connect to it.
	option http-server-close
	server srv 127.0.0.1:8080 maxconn 254

PS: Indeed it works for other HTTP server software.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.