On Google Cloud I've setup a VM as varnish 6 (community) to manage http and http2 (without SSL/TLS).
I've also setup hitch on port 443 and using a public IP it works fine.
Goal (EDIT)
Now I'd like to put this VM behind a load balancer, as pointed out with @Frank, my goal is to replace hitch with google-cloud-load-balancer service.
My configuration
I've created an unmanaged instance group with using VM opening three ports in config:
An my load-balancer configuration with the "Endpoint protocol" set to HTTP/2 is:
But this setup give me a 502 error code:
HTTP/2 502
content-type: text/html; charset=UTF-8
referrer-policy: no-referrer
content-length: 332
date: Fri, 13 Nov 2020 14:38:02 GMT
alt-svc: clear
Endpoint set to HTTP
If I change the Endpoing Protocol to HTTP:
It works, but the request protocol is HTTP/1.1, as shown by varnishlog
:
* << Request >> 44493
- ReqMethod GET
- ReqURL /?test=1
- ReqProtocol HTTP/1.1