当前位置:网站首页>haproxy实现代理配置
haproxy实现代理配置
2022-07-28 17:04:00 【水月清辉】
global
log 127.0.0.1 local2 info
chroot /usr/local/haproxy #改变当前工作目录
pidfile /var/run/haproxy.pid #当前进程id文件
maxconn 4000 #最大连接数
user haproxy #所属用户
group haproxy #所属组
nbproc 4
cpu-map 1 0
cpu-map 2 1
cpu-map 3 2
cpu-map 4 3
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 #http请求超时时间
timeout queue 1m
timeout connect 10s #连接超时
timeout client 1m #客户端超时
timeout server 1m #服务器端超时
timeout http-keep-alive 10s
timeout check 10s #检测超时
maxconn 3000
listen status
bind 0.0.0.0:1080
mode http
log global
stats refresh 30s
stts uri /admin?stats
stats realm Private lands
stats auth admin:[email protected]
stats hide-version
###代理MySQL服务###
frontend test_mysql
bind 0.0.0.0:3300
mode tcp
use_backend backend_test_mysql
backend backend_test_mysql
mode tcp
balance roundrobin
server test_mysql 192.168.2.3:3306 maxconn 2000 check
###代理MySQ2L服务###
frontend test1_mysql
bind 0.0.0.0:3301
mode tcp
use_backend backend_test1_mysql
backend backend_test1_mysql
mode tcp
balance roundrobin
server test_mysql 192.168.2.3:3306 maxconn 2000 check
边栏推荐
- Examples of AC simulation and S-parameter simulation of ADS simulation
- 微信公众号授权登录后报redirect_uri参数错误的问题
- 七个步骤,深入解读数据含义
- Centos8 uses docker to install WordPress in wordpress+mysql configuration file_ DB_ Understanding of host
- 信号源原理简介
- Busybox latest version (busybox APK)
- Strong performance growth! Wentai technology's net profit in the first half of the year was 1.7 billion yuan, a sharp increase of 767.19% year-on-year!
- Members who have opened a website need to download e-book messages for free
- Modifier modifier modifier of solidity _;
- Leetcode79 method 1: deep search
猜你喜欢
随机推荐
顿悟!百度强推的Redis天花板笔记,原来数据库是这样理解的
Mongodb initialization operation
食品安全 | 面包含盐量也会超标?几招教你正确吃面包!
高温天气户外活动有讲究!市民盛夏健身安全指引来了
What role does low code play in the digital transformation?
Introduction to advanced design system (ads) 2009 RF simulation
After CentOS uses docker to run mysql, the remote connection needs to open the port
Power adapter global definition
Go's sleep
Some methods of realizing video account
Nearly 200000 people watched a live calligraphy video
solidity的modifier修饰器的_;
Tcp/ip detailed diagram
【译】创意编码之噪音
Examples of AC simulation and S-parameter simulation of ADS simulation
MongoDB创建索引
Video number from 2-3 games per week to 3 games per day
Introduction to USB type-C PD fast charging
Andorid: pit encountered by zxing.demo QR code scanning framework
MQTT over QUIC:下一代物联网标准协议为消息传输场景注入新动力

![[dry goods] how to establish a close relationship between support and products?](/img/ec/bc36beb0935968fec3791910e2cb0a.png)






