HAProxy基本翻译

更新时间:2023-05-16 04:28:44 阅读: 评论:0

HAProxy基本翻译REF:cbonte.github.io/haproxy-dconv/1.5/configuration.html
Proxy configuration can be located in a t of ctions :
- defaults <name>
- frontend <name>
- backend  <name>
- listen  <name>
A "defaults" ction ts default parameters for all other ctions following
its declaration. Tho default parameters are ret by the next "defaults"
ction. See below for the list of parameters which can be t in a "defaults"
ction. The name is optional but its u is encouraged for better readability.
"defaults" 区块设置默认参数,对其定义后的所有区块有效。所有默认参数在优先级上,会被后⾯的“def
aults”区块覆盖。"defaults"区块可设置参数清单见下⽂。“name”不是必须的,但为了有较好的可读性
建议写上。
A "frontend" ction describes a t of listening sockets accepting client
connections.
“frontend”区块描述接受客户端连接的监听sockets集。
A "backend" ction describes a t of rvers to which the proxy will connect
to forward incoming connections.
“backend”区块描述代理服务器集,代理将连接并转发⼊栈信息给这些服务器。
A "listen" ction defines a complete proxy with its frontend and backend
parts combined in one ction. It is generally uful for TCP-only traffic.
“listen”区块定义了完整的代理,将“frontend”和“backend”结合在⼀个区块中。⼀般⽤在TCP-only
乘着梦想的翅膀
流量中。
All proxy names must be formed from upper and lower ca letters, digits,
'-' (dash), '_' (underscore) , '.' (dot) and ':' (colon). ACL names are
ca-nsitive, which means that "www" and "WWW" are two different proxies.
所有的代理名称必须由⼤⼩写字符、数字、'-'、'_'、'.'和':'构成。ACL名对⼤⼩写敏感,这
珠江的长度意味着"www"和“WWW”代表不同的代理。
Historically, all proxy names could overlap, it just caud troubles in the
logs. Since the introduction of content switching, it is mandatory that two
怎么查询违章记录proxies with overlapping capabilities (frontend/backend) have different names.
However, it is still permitted that a frontend and a backend share the same
name, as this configuration ems to be commonly encountered.
Right now, two major proxy modes are supported : "tcp", also known as layer 4,
and "http", also known as layer 7. In layer 4 mode, HAProxy simply forwards
bidirectional traffic between two sides. In layer 7 mode, HAProxy analyzes the
protocol, and can interact with it by allowing, blocking, switching, adding,
雪蛤的功效与作用modifying, or removing arbitrary contents in requests or respons, bad on
arbitrary criteria.
⽬前,HAProxy⽀持两种主要的模式:“tcp”(4层)和“http”(7层)。在4层模式,HAProxy只是
简单的转发双向流量。在7层模式,HAProxy分析协议,并根据任意条件对请求和响应内容进⾏允许、阻断、交换和增删改。
In HTTP mode, the processing applied to requests and respons flowing over
a connection depends in the combination of the frontend's HTTP options and
the backend's. HAProxy supports 5 connection modes :
在HTTP模式下,对请求和响应的处理由前端的HTTP option和后端配合决定。HAProxy⽀持五种
连接模式。
- KAL : keep alive ("") which is the default mode : all
requests and respons are procesd, and connections remain open but idle
between respons and new requests.
- TUN: tunnel ("") : this was the default mode for versions
1.0 to 1.5-dev21 : only the first request and respon are procesd, and
everything el is forwarded with no analysis at all. This mode should not
be ud as it creates lots of trouble with logging and HTTP processing.
- PCL: passive clo ("") : exactly the same as tunnel mode,
but with "Connection: clo" appended in both directions to try to make
both ends clo after the first request/respon exchange.
- SCL: rver clo ("") : the rver-facing
connection is clod after the end of the respon is received, but the
client-facing connection remains open.
- FCL: forced clo ("") : the connection is actively clod
after the end of the respon.
The effective mode that will be applied to a connection passing through a frontend and a backend can be determined by both proxy modes according to the following matrix, but in short, the modes are symmetric, keep-alive is the weakest option and force clo is the strongest.
Backend mode
| KAL | TUN | PCL | SCL | FCL
----+-----+-----+-----+-----+----
KAL | KAL | TUN | PCL | SCL | FCL
----+-----+-----+-----+-----+----
TUN | TUN | TUN | PCL | SCL | FCL
Frontend  ----+-----+-----+-----+-----+----
mode    PCL | PCL | PCL | PCL | FCL | FCL宝宝营养粥
----+-----+-----+-----+-----+----
SCL | SCL | SCL | FCL | SCL | FCL
----+-----+-----+-----+-----+----
FCL | FCL | FCL | FCL | FCL | FCL
最后附上⼀段配置⽂件example供参考
# Simple configuration for an HTTP proxy listening on port 80 on all
# interfaces and forwarding requests to a single backend "rvers" with a
# single rver "rver1" listening on 127.0.0.1:8000
global
daemon
军用装甲车
maxconn 256
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout rver 50000ms
frontend http-in
bind *:80
default_backend rvers
backend rvers
rver rver1 127.0.0.1:8000 maxconn 32
# The same configuration defined with a single listen block. Shorter but
# less expressive, especially in HTTP mode.
global
daemon
maxconn 256
defaults铁板牛肉的做法
mode http赤眉起义
timeout connect 5000ms
timeout client 50000ms
timeout rver 50000ms
listen http-in
bind *:80
rver rver1 127.0.0.1:8000 maxconn 32

本文发布于:2023-05-16 04:28:44,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/902204.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:区块   请求   代理   连接   响应
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图