litespeedtech / openlitespeed

Our high-performance, lightweight, open source HTTP server
https://openlitespeed.org
GNU General Public License v3.0
1.2k stars 194 forks source link

http2 in upstream proxy connections #305

Open murty2 opened 2 years ago

murty2 commented 2 years ago

I have a backend server 127.0.0.1:8000 that supports http2 only (because it uses nghttp2 library), no http 1.1, no connection Upgrade command.

I am trying to configure my OpenLiteSpeed reverse proxy to my backend server using the following in extprocessor {..}

address h2://127.0.0.1:8000

This does not work. If I disable SSL in my backend server and try the following

address h2c://127.0.0.1:8000

also does not work.

How to use http2 in upstream proxy connections? Alternatively, how to connect to backend gRPC server?

litespeedtech commented 2 years ago

HTTP/2 backend are not supported. Maybe will be added in 1.8 branch.

murty2 commented 2 years ago

I hope http2 and http2c backend support show up in 1.8 branch. In the meanwhile, I am using nghttpx to proxy http1.1 from LiteSpeed to http/2 (without enc) like this

nghttpx -f'unix:/home/sysadmin/mysock;;no-tls' -b'127.0.0.1,8000;;proto=h2'