duanji1056
2017-02-16 00:31 阅读 112
已采纳

Go中具有SSL终止和HTTP / 2的HAProxy

I have a web application written in Go and load balanced by HAProxy. HAProxy also handles SSL/TLS termination. Currently the responses are all HTTP/1.1 and I'd like them to be HTTP/2. I've tried various things in haproxy.conf, but haven't been able to get it working.

I'm able to get a standalone Go server that handles its own SSL termination to use HTTP/2, but it looks like all current browsers only support HTTP/2 over TLS. Does this mean that I need to handle the SSL termination at the web app itself? Or is there some workaround that I don't know about so that I can continue terminating SSL at the load balancer and still use HTTP/2?

It looks like this is impossible, but I'm hoping there is a way to do it since otherwise I need to deal with SSL certificates at each web application rather than just at the load balancer.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    dongtiao5094 dongtiao5094 2017-02-16 10:07

    Or is there some workaround that I don't know about so that I can continue terminating SSL at the load balancer and still use HTTP/2?

    If I've got you right, you need a HTTP/2 aware load balancer which can proxy your requests to your application. You may use nginx. It can excellent do http2 termination, load balancing and many other things. So probably you may not need haproxy at all. However haproxy is useful if you want some advanced features like sticky sessions. Nginx also can do them, but only in a commercial version.

    Here's an article (in Google cache) how to setup nginx + haproxy.

    点赞 评论 复制链接分享

相关推荐