首页 > 其他分享 >haproxy 2.6 发布

haproxy 2.6 发布

时间:2022-10-04 16:32:17浏览次数:68  
标签:haproxy quic log 发布 https var 2.6

haproxy 2.6 发布了,提供了不少特性,其中quic (http3) 是可以直接使用了(注意依赖openssl 版本)我已经构建一个版本

http3 参考使用

  • docker 镜像
dalongrong/haproxy:2.6-debian-quic
  • 使用
    可以直接参考官方示例

 

#---------------------------------------------------------------------
# Example configuration for a possible web application.  See the
# full configuration options online.
#
#   https://www.haproxy.org/download/2.6/doc/configuration.txt
#   https://cbonte.github.io/haproxy-dconv/2.6/configuration.html
#
#---------------------------------------------------------------------

 

#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# 1) configure syslog to accept network log events.  This is done
#    by adding the '-r' option to the SYSLOGD_OPTIONS in
#    /etc/sysconfig/syslog
#
# 2) configure local2 events to go to the /var/log/haproxy.log
#   file. A line like the following can be added to
#   /etc/sysconfig/syslog
#
#    local2.*                       /var/log/haproxy.log
#
log         127.0.0.1 local2

 

chroot      /var/lib/haproxy
pidfile     /var/run/haproxy.pid
maxconn     4000
user        haproxy
group       haproxy
# daemon

 

# turn on stats unix socket
stats socket /var/lib/haproxy/stats

 

#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
mode                    http
log                     global
option                  httplog
option                  dontlognull
option http-server-close
option forwardfor       except 127.0.0.0/8
option                  redispatch
retries                 3
timeout http-request    10s
timeout queue           1m
timeout connect         10s
timeout client          1m
timeout server          1m
timeout http-keep-alive 10s
timeout check           10s
maxconn                 3000

 

resolvers mynameservers
nameserver ns1 127.0.0.11:53

 

frontend mysite
bind :80
bind :443  ssl crt /etc/haproxy/certs/dalong.com/cert.crt alpn h2

 

# enables HTTP/3 over QUIC
bind quic4@:443 ssl crt /etc/haproxy/certs/dalong.com/cert.crt alpn h3

 

# Redirects to HTTPS
http-request redirect scheme https unless { ssl_fc }

 

# Switches to the QUIC protocol
http-response set-header alt-svc "h3=\":443\";ma=2592000;"

 

default_backend webservers

 

backend webservers
balance roundrobin
server web1 app:80 check maxconn 30 resolvers mynameservers

 

frontend stats
bind *:8404
stats enable
stats uri /stats
http-request use-service prometheus-exporter if { path /metrics }
stats refresh 10s
stats admin if LOCALHOST

 

参考效果

haproxy 2.6 发布_3c

 

 

说明

quic 协议是很复杂的,http3 稳定以及可以大规模应用还是需要一段时间的

参考资料

​https://www.haproxy.com/blog/announcing-haproxy-2-6/​​​
​​​https://http3-explained.haxx.se/en/why-quic​​​
​​​https://github.com/rongfengliang/haproxy-quic​​​
​​​https://github.com/haproxytechblog/haproxy-2.6-http3​​​
​​​https://http3check.net/​

标签:haproxy,quic,log,发布,https,var,2.6
From: https://blog.51cto.com/rongfengliang/5731349

相关文章

  • Media Encoder 2022 for Mac(ME 2022)v22.6.1中文版
    ME2022正式更新了!快来体验新版的Me吧,ME2022中文版使用TimeTuner可以无形地调整持续时间,并应用LUT和响度校正,而无需重新打开项目。与AdobePremierePro、AfterEffe......
  • Cloudera Enterprise 6正式发布
    温馨提示:如果使用电脑查看图片不清晰,可以使用手机打开文章单击文中的图片放大查看高清原图。Fayson的github:​​https://github.com/fayson/cdhproject​​提示:代码块部分可......
  • 0870-CDP公有云发布Iceberg技术预览版
    在过去的十年中,我们的客户成功部署的大规模数据集群已成为推动需求的大数据飞轮,它可以引入更多的数据,应用更复杂的分析,并成就了从业务分析师到数据科学家的许多新数据从业者......
  • 感慨 vscode 支持win7最后一个版本 1.70.3 于2022年7月发布
    为什么家里电脑一直是win7,也懒的升级,nodejs也不能用最新的,没想到vscode也停产了https://code.visualstudio.com/updates/v1_70......
  • 发布稳定性-优雅上线
    之前的文章讲了优雅下线发布稳定性-优雅下线,今天讲优雅上线优雅上线也叫:「无损上线」,「延迟发布」,「延迟暴露」。与之对立的自然是:「有损上线」,「直接发布」什么是优雅上......
  • 【TS】251- TypeScript 3.5发布:速度提升、工具智能
    TypeScript3.5发布了,此版本在编译器、语言和编辑器工具上带来了一些新特性。速度提升TypeScript3.5引入了几种对于type检查和增量构建的优化,使得速度大幅提升。type......
  • docker实战教程(十):本地镜像发布到私有库
    背景官方dockerhub地址:​​https://hub.docker.com​​,中国大陆访问太慢了且准备被阿里云取代的趋势,不太主流dockerhub、阿里云这样的公共镜像仓库可能不太方便,涉及机密的......
  • docker实战教程(九):本地镜像发布到阿里云
    流程构建镜像的两种方式:commit、dockerfilebuild推送到远程的两种方式:阿里云、私有库步骤选择控制台,进入容器镜像服务,创建个人版实例创建命名空间创建镜像仓库进入管理界......
  • 发布稳定性-优雅下线
    背景最近负责的项目已经到达10万QPS的大关了,这么高的QPS,对系统的稳定性要求也更高了。之前QPS小的时候,系统更新部署很简单,现在不行了,一部署起来,上游应用方就找过来了,说你......
  • cnpack 1.2.5发布!
    2022年10月1日,开放源码的CnPackIDE专家包发布1.2.5正式版。欢迎下载使用!地址:https://www.cnpack.org/showdetail.php?id=900&lang=zh-cn1.2.5较1.2.4的更新:+支持R......