duanji1056 2017-02-16 00:31
浏览 146
已采纳

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 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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?