Feature request: Make connection and keep-alive timeouts configurable

Hi,

When a Nuxeo server is behind a load balancer which can reuse backend TCP connections, we should ensure that the load balancer is responsible for closing TCP connections by defining its idle timeout to be lower than Nuxeo's keep-alive timeout [1].

However, as of today, Nuxeo's embedded Tomcat keep-alive timeout is implicitly set to 20 seconds and cannot be easily configured as:

  • In server.xml.nxftl, connectionTimeout is hard-coded to 20 seconds [2];
  • And as keepAliveTimeout, the HTTP Connector attribute which defines this keep-alive timeout, uses the value set for connectionTimeout as its default value [3].

This 20 seconds value can be problematic in cases where the load balancer idle timeout is higher and cannot be configured (for example, the default idle timeout on AWS Application Load Balancers is 60s [4]).

In these cases, it would be useful to be able to configure this keep-alive timeout.

This can already be done today by manually altering the contents of the server.xml.nxftl template file but this would be better if the keepAliveTimeout value could be parameterized. The connectionTimeout value could also be parameterized on the same occasion.

For example, this commit that adds nuxeo.server.http.connectionTimeout and nuxeo.server.http.keepAliveTimeout configuration parameters, which can be defined in nuxeo.conf: https://github.com/stephaneseng/nuxeo/commit/3951c0a737174c630bfb0748846d040952eaf74a.

Is this feature request acceptable?
If this is the case I can open a Pull Request on GitHub with the aforementioned commit.

Regards,
Stéphane.

[1] https://doc.nuxeo.com/nxdoc/http-and-https-reverse-proxy-configuration/#configuration-between-aws-elastic-load-balancing-elb-and-apache
[2] https://github.com/nuxeo/nuxeo/blob/master/server/nuxeo-nxr-server/src/main/resources/templates/common-base/conf/server.xml.nxftl#L84
[3] https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#Standard_Implementation
[4] https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#connection-idle-timeout

0 votes

1 answers

1308 views

ANSWER



Hello,

Thanks for your feedback. You can send your feedback on our open Product Roadmap and Feedback portal: https://doc.nuxeo.com/nxdoc/nuxeo-server-roadmap/

This is the best way to add any suggestion and get a feedback from the team.

Regards

1 votes