Yes, Thank you. In tcp mode, No need forwardfor. In my understanding, it add a 
field X-Forwarded-For in http header. Besides, Do they have differences in 
scheduling according to my configuration?


2019年10月24日 下午9:34,Aleksandar Lazic 
<[email protected]<mailto:[email protected]>> 写道:

Hi.

Am 24.10.19 um 13:05 schrieb Zhengyu Pan(联通集团联通云数据有限公司本部):
Hi,
Does configuration mode tcp, port 80 and mode http, port 80 have differences 
without setting other http options in Haproxy?

No afaik, but `option forwardfor` is a http option which does not work
in tcp mode. you should get a warning at config and start phase.

Regards
Aleks

This is http:80 configuration:

frontend 18857e04-cd6a-47a8-859e-38a7a4e0d8c5
option tcplog
option forwardfor
bind 0.0.0.0:80
mode http
default_backend 86d030d2-4893-4c37-b391-48e54d86c7e3
backend 86d030d2-4893-4c37-b391-48e54d86c7e3
mode http
balance roundrobin
option forwardfor
server 56653038-5af1-47b3-881c-e0e164bf459f 192.168.2.21:80 weight 1
server 80e5fb55-81fd-4753-98bd-2f330478b953 192.168.2.22:80 weight 1

This is tcp:80 configuration:

frontend 18857e04-cd6a-47a8-859e-38a7a4e0d8c5
option tcplog
option forwardfor
bind 0.0.0.0:80
mode tcp
default_backend 86d030d2-4893-4c37-b391-48e54d86c7e3
backend 86d030d2-4893-4c37-b391-48e54d86c7e3
mode tcp
balance roundrobin
option forwardfor
server 56653038-5af1-47b3-881c-e0e164bf459f 192.168.2.21:80 weight 1
server 80e5fb55-81fd-4753-98bd-2f330478b953 192.168.2.22:80 weight 1
如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 
[email protected]<mailto:[email protected]>,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。
 If you have received this email in error please notify us immediately by 
e-mail. Please reply to [email protected]<mailto:[email protected]> 
,you can unsubscribe from this mail. We will immediately remove your 
information from send catalogue of our.

如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 
[email protected],即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received 
this email in error please notify us immediately by e-mail. Please reply to 
[email protected] ,you can unsubscribe from this mail. We will 
immediately remove your information from send catalogue of our.

Reply via email to