added max_keepalive_requests

I've added max_keepalive_requests to the template and class, so it's more scalable and better than using a hardcoded value in the template