当前位置:网站首页>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
边栏推荐
- [dry goods] how to establish a close relationship between support and products?
- SMIC's net profit in the first half of the year was 1.386 billion yuan, and the n+1 process has entered the stage of customer product verification
- Dormant for two years! Lingsheng technology's first aiot chip released: Samsung 11nm process, integrated NPU core!
- Cloud container and cloud native
- 低码在数字化转型中扮演什么角色?
- NDK 系列(5):JNI 从入门到实践,爆肝万字详解!
- 中芯国际上半年净利13.86亿元,N+1工艺已进入客户产品验证阶段
- 顿悟!百度强推的Redis天花板笔记,原来数据库是这样理解的
- 华为中兴在英国败诉,不交专利授权费将被禁售!
- 深圳线下报名|StarRocks on AWS:如何对实时数仓进行极速统一分析
猜你喜欢

Examples of AC simulation and S-parameter simulation of ADS simulation

深圳线下报名|StarRocks on AWS:如何对实时数仓进行极速统一分析

GIS数据漫谈(六)— 投影坐标系统

示波器简介

Detailed explanation of oscilloscope parameters

微信公众号授权登录后报redirect_uri参数错误的问题

#夏日挑战赛#【FFH】JS自定义组件:DIY一个随点随用的键盘!(一)

Detailed explanation of network RJ45 interface

频谱仪原理简介一

频谱仪原理简介二
随机推荐
7-day sales of video number exceed one million
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!
busybox最新版(busybox apk)
Details of iptables firewall
syntax error: non-declaration statement outside function bodygo 和 syntax error: unexpected {, expect
苹果供应商JDI拟以6.75亿美元出售白山LCD工厂和设备
有一种密码学专用语言叫做ASN.1
Advanced Design System(ADS)2009 射频仿真入门
MySQL operation Encyclopedia
连线:谁拥有未来的艺术?OpenAI允许Dall-E用户将作品商用化,目前而言
C WPF normal project suddenly prompts that the name "initializecomponent" does not exist in the current context
食品安全 | 面包含盐量也会超标?几招教你正确吃面包!
Categories with good sales volume on the video Number
天线的原理、分类及要求
美国对华为禁令开始波及欧洲芯片厂商
Centos8 uses docker to install WordPress in wordpress+mysql configuration file_ DB_ Understanding of host
华为中兴在英国败诉,不交专利授权费将被禁售!
天线的主要参数介绍
solidity的msg.value
#夏日挑战赛#【FFH】JS自定义组件:DIY一个随点随用的键盘!(一)