Mats Eklund wrote on 22.06.2017:
Hi Holger, Many thanks for this hint. I guess I will need to follow up with Openshift/RedHat. I have posted a question in the forum there, but so far no feedback: https://stackoverflow.com/questions/44134775/how-to-suppress-http-connection-keep-alive-header-in-response. |
Which openshift version do you use?
I have also added this question to the stackoverflow question.
Thanks also for the advice to upgrade. I'm not sure if that is easy or even possible in Openshift online. Maybe their next version of the platform (v3) will have a more recent version of HAProxy. Would be nice, because I am also missing some of the config options that were added in later versions. |
In openshift v3 is haproxy 1.5.18 (rh rpm) in place.
The configfile for the openshift router can be found on github.
https://github.com/openshift/origin/blob/master/images/router/haproxy/conf/haproxy-config.template
If you want to use it on premise you can replace it with your own.
https://docs.openshift.org/latest/install_config/router/customized_haproxy_router.html#using-configmap-replace-template
As lukas written in this message below you will need to modify the haproxy config, which you can't on openshift online.
https://www.mail-archive.com/haproxy@formilux.org/msg26530.html
For the openshift router are some values which can be used to configure haproxy.
https://docs.openshift.org/latest/install_config/router/customized_haproxy_router.html#using-env-var
Side note: The *COMPRESSION* was my contribution ;-)))
Kind regards, Mats |
Regards
Aleks
> > >Hi Mats, > >Mats Eklund wrote: >> I am running a load balanced Tomcat application on Openshift Online >>v2, with HAProxy ver. 1.4.22 as load balancer. > >With your current config, HAProxy will add a "Connection: close" header >to responses. However, since you mentioned you are running this in an >OpenShift environment, there might (and probably is) be another layer >of proxies involved between your HAProxy and your client. > >Since you are speaking plain HTTP here, this other proxy might chose to >use keep-alive connections towards the client, similar to how HAProxy's >option http-server-close works. In that case, you would have to change >the configuration of this other proxy too. > >Best, >Holger > >P.S. HAProxy 1.4 is OLD and receives only critical fixes now. You should >seriously consider upgrading to a newer version. The current stable >version if 1.7.26. > >At the very least, you should upgrade to the latest 1.4 version 1.4.27 >has fixed 83 known bugs since 1.4.22. See >https://www.haproxy.org/bugs/bugs-1.4.22.html for details. |