HTTP/1.0 shouldn't be used

Bug #1952361 reported by Junien F
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Content Cache Charm
In Progress
High
Haw Loeung

Bug Description

Hi,

It would appear that nginx uses HTTP/1.0 when connecting to haproxy.
It would also appear that haproxy uses HTTP/1.0 when connecting to its non-cached backends.

HTTP/1.0 doesn't have keep-alive support, so this could be causing a lot of churns.
When I tcpdump'ed traffic from a content-cache unit to its backend, filtering only new TCP connections [1], I'm seeing a constant stream of packets, which shouldn't happen.

Thanks

[1] sudo tcpdump -n -i $int 'host $backend and tcp port 443 and tcp[tcpflags] == tcp-syn'

Related branches

Haw Loeung (hloeung)
Changed in content-cache-charm:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Haw Loeung (hloeung)
Revision history for this message
Junien F (axino) wrote :

tcpdump showing a constant stream of new connections could actually be explained by haproxy healthchecks, which we configure to use HTTP/1.0 for some reason. Not sure if we can/want to make them using a single, kept-alive session or not.

Revision history for this message
Haw Loeung (hloeung) wrote (last edit ):

Landed various things making the switch to either HTTP/2 or HTTP/1.1. What's left is to update the Nginx layer to use upstream module and activate keepalive as documented[1] with the example below:

| upstream http_backend {
| server 127.0.0.1:8080;
|
| keepalive 16;
| }
|
| server {
| ...
|
| location /http/ {
| proxy_pass http://http_backend;
| proxy_http_version 1.1;
| proxy_set_header Connection "";
| ...
| }
| }

The upstream name, in this case "http_backend", needs to be unique across all sites.

[1]https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive

Haw Loeung (hloeung)
Changed in content-cache-charm:
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.