nghttpx communicating via HTTP/2 results in more network traffic vs HTTP/1.1

285 Views Asked by At

I have this set up:

[Web Site]--WAN--[Squid]---[nghttpx #2]--WAN--[nghttpx #1]---[web browser]

nghttpx #1 accepts an HTTP proxy request from local web browser via HTTP/1.1, and establishes HTTP/2 connection to nghttpx #2 which requests the Web Site, and the content is returned via the same path. The goal would be to establish HTTP/2 connection over WAN connecting nghttpx #1 to nghttpx #2, in order to preserve network traffic.

nghttpx #1 is running as:

nghttpx -p -f127.0.0.1,8080 -bnghttpx #2 IP,8443 --backend-no-tls --log-level=INFO

nghttpx #2 is running as:

nghttpx -s -f'*,8443' -b127.0.0.1,12345 --backend-no-tls --frontend-no-tls --log-level=INFO

where on port 12345 is Squid.

Now, I measure byte count on the WAN network interface where nghttpx #1 and web browser are running via /usr/bin/netstat -i -b -n -I interface. Input bytes while accessing directly without any proxies, I measure ~150 kB to load a Web Site. With this nghttpx chain, it is ~170 kB. I am very surprised to see I am actually getting more network traffic while using HTTP/2.

Question: shouldn't HTTP/2 result in traffic savings due to compression? What am I doing wrong?

Thank you!

0

There are 0 best solutions below