Should I continue using KeepAlive on my Apache server?

I use Cloudflare with WAF enabled (orange cloud enabled in DNS).

My Apache server that is called by Cloudflare has KeepAlive enabled.

But from what I understand, KeepAlive will keep active connections for existing users, but since Cloudflare sends the same request from a user through different IPs it seems to me that it will not be able to detect that it is the same user.

So my question is, should I still keep KeepAlive enabled on my Apache server?

This is Apache config:

MaxKeepAliveRequests 150
KeepAliveTimeout 1

Yes, you should leave it enabled. The Origin KeepAlive is for the Cloudflare-Origin connection, and does not relate to the User-Cloudflare connection. If your Origin is only serving requests to Cloudflare, setting a long value for KeepAliveTimeout (like 900 seconds) will generally give better performance.

If your Origin is also serving non-Cloudflare traffic just be aware that setting a long KeepAliveTimeout may have a negative impact, so using a configuration from some random person on the Internet might not be wise. A suitable config depends on the load on your Origin and its overall configuration.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.