# this config needs haproxy-1.1.28 or haproxy-1.2.1

global
log 127.0.0.1 local0
log 127.0.0.1 local1 info
#log loghost local0 info
maxconn 200000
#chroot /usr/share/haproxy
uid 99
gid 99
daemon
nbproc 4
#debug
#quiet defaults
log global
mode http
#option httplog
option dontlognull
retries 3
option redispatch
option forwardfor
maxconn 20000
timeout connect 5000
timeout client 50000
timeout server 50000 frontend http-in
bind *:80 acl is_pushstatis path_beg /pmsg/admin/
use_backend overseapaystatis if is_pushstatis acl is_pushstatis2 path_beg /pmsg/adminmanager/
use_backend overseapaystatis if is_pushstatis2 acl is_pmsg path_beg /pmsg/api/
use_backend overseapmsg if is_pmsg acl is_adsadmin path_beg /overseaads/admin/
use_backend overseaadsadmin if is_adsadmin acl is_adsadmin2 path_beg /overseaads/adminmanager/
use_backend overseaadsadmin if is_adsadmin2 acl is_ads path_beg /overseaads/
use_backend overseaads if is_ads acl is_base path_beg /overseabase/
use_backend overseabase if is_base acl is_payagent path_beg /payagent/
use_backend overseapayagent if is_payagent acl is_paystatis path_beg /overseapay/admin/
use_backend overseapaystatis if is_paystatis acl is_paystatis2 path_beg /overseapay/adminmanager/
use_backend overseapaystatis if is_paystatis2 acl is_appstore path_beg /appstore/
use_backend overseapaystatis if is_appstore acl is_adjustdownloadredis path_beg /oversea_adjust_and_download_write_redis/
use_backend adjustdownloadredis if is_adjustdownloadredis acl is_overseadownloaddb path_beg /oversea_download_read_redis/
use_backend overseadownloaddb if is_overseadownloaddb acl is_overseaadjustdb path_beg /oversea_adjust_read_redis/
use_backend overseaadjustdb if is_overseaadjustdb acl is_ebusin path_beg /ebusin/
use_backend ebusin if is_ebusin acl is_callbackicon path_beg /callbackicon/
use_backend callbackicon if is_callbackicon acl is_pilotupdate path_beg /pilot/api/7003
use_backend pilotupdate if is_pilotupdate acl is_pilotForInstall path_beg /pilot/api/8001
use_backend pilotForInstall if is_pilotForInstall acl is_pilotCollect path_beg /pilot/api/4001
use_backend pilotCollect if is_pilotCollect acl is_pilotIcon path_beg /pilot/api/2001
use_backend pilotIcon if is_pilotIcon acl is_pilotNew path_beg /pilot/api/7004
use_backend pilotNew if is_pilotNew acl is_pilot path_beg /pilot/
use_backend pilot if is_pilot acl is_overseahots path_beg /overseahots/
use_backend overseahots if is_overseahots acl is_pagetwo path_beg /pagetwo/
use_backend pagetwo if is_pagetwo acl is_browser path_beg /browser/
use_backend browser if is_browser acl is_accredit path_beg /accredit/
use_backend accredit if is_accredit default_backend overseapay backend overseapay
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 127.0.0.1:8080 cookie 1 check inter 2000 rise 2 fall 5 weight 10
#server ngsteam_2 127.0.0.1:8080 cookie 2 check inter 2000 rise 2 fall 5 weight 10
#server ngsteam_3 127.0.0.1:8080 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_4 172.31.6.182:8080 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_5 172.31.6.182:8081 cookie 2 check inter 2000 rise 2 fall 5 weight 10
#server ngsteam_6 172.31.6.182:8082 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_7 172.31.7.166:8080 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_8 172.31.7.166:8081 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_9 172.31.7.166:8082 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_10 172.31.7.166:8083 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend overseaads
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
# server ngsteam_1 127.0.0.1:8280 cookie 1 check inter 2000 rise 2 fall 5 weight 10
# server ngsteam_2 127.0.0.1:8280 cookie 2 check inter 2000 rise 2 fall 5 weight 10 server ngsteam_3 172.31.7.166:9190 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_4 172.31.7.166:9190 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_5 172.31.5.123:9190 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_6 172.31.5.123:9190 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_7 172.31.5.123:9290 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_8 172.31.5.123:9290 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_9 172.31.5.123:9390 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_10 172.31.5.123:9390 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend overseaadsadmin
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 127.0.0.1:8280 cookie 1 check inter 2000 rise 2 fall 5 weight 10 backend overseapaystatis
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 127.0.0.1:9091 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_2 127.0.0.1:9091 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend overseabase
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 127.0.0.1:8080 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server ngsteam_2 172.31.6.182:8180 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend overseapmsg
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 127.0.0.1:9090 cookie 1 check inter 2000 rise 2 fall 5
server ngsteam_2 127.0.0.1:9090 cookie 2 check inter 2000 rise 2 fall 5
server ngsteam_3 172.31.7.166:9090 cookie 1 check inter 2000 rise 2 fall 5
server ngsteam_4 172.31.7.166:9090 cookie 2 check inter 2000 rise 2 fall 5 backend overseapayagent
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 127.0.0.1:8180 cookie 1 check inter 2000 rise 2 fall 5
server ngsteam_2 127.0.0.1:8180 cookie 2 check inter 2000 rise 2 fall 5 backend adjustdownloadredis
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 172.31.6.182:8280 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend overseaadjustdb
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 172.31.6.182:8280 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend overseadownloaddb
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 172.31.6.182:8280 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend overseahots
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 54.169.85.22:8100 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend pilotupdate
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server pilot16 52.76.47.8:8083 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot17 52.76.47.8:8084 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot18 52.76.47.8:8085 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot19 52.76.47.8:8086 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot20 52.76.47.8:8087 cookie 1 check inter 2000 rise 2 fall 5 weight 10 backend pilotForInstall
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server pilot16 52.76.9.91:8580 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot17 52.76.9.91:8581 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot18 52.76.9.91:8582 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot19 52.76.9.91:8583 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot20 52.76.9.91:8085 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot21 52.76.9.91:8086 cookie 1 check inter 2000 rise 2 fall 5 weight 10 backend pilotCollect
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server pilot16 52.76.9.91:8580 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot17 52.76.9.91:8581 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot18 52.76.9.91:8582 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot19 52.76.9.91:8583 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot20 52.76.9.91:8085 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot21 52.76.9.91:8086 cookie 1 check inter 2000 rise 2 fall 5 weight 10 backend pilotIcon
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server pilot16 52.76.9.91:8580 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot17 52.76.9.91:8581 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot18 52.76.9.91:8582 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot19 52.76.9.91:8583 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot20 52.76.9.91:8085 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot21 52.76.9.91:8086 cookie 1 check inter 2000 rise 2 fall 5 weight 10 backend pilotNew
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server pilot16 52.76.9.91:8580 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot17 52.76.9.91:8581 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot18 52.76.9.91:8582 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot19 52.76.9.91:8583 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot20 52.76.9.91:8085 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot21 52.76.9.91:8086 cookie 1 check inter 2000 rise 2 fall 5 weight 10
backend pilot
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server pilot_1 52.76.178.137:8087 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server pilot_2 52.76.178.137:8088 cookie 2 check inter 2000 rise 2 fall 5 weight 10
server pilot3 127.0.0.1:8080 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot4 127.0.0.1:8081 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot5 127.0.0.1:8082 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot6 127.0.0.1:8083 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot7 127.0.0.1:8085 cookie 1 check inter 2000 rise 2 fall 5 weight 10 server pilot8 52.74.215.96:8081 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot9 52.74.215.96:8082 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot10 52.74.215.96:8083 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot11 52.74.215.96:8084 cookie 1 check inter 2000 rise 2 fall 5 weight 10 server pilot12 52.74.202.199:8085 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot13 52.74.202.199:8086 cookie 1 check inter 2000 rise 2 fall 5 weight 10 server pilot14 52.77.50.116:8080 cookie 1 check inter 2000 rise 2 fall 5 weight 10
server pilot15 52.77.50.116:8081 cookie 1 check inter 2000 rise 2 fall 5 weight 10 backend browser
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server browser_1 52.74.215.96:8080 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend accredit
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server accredit_1 127.0.0.1:8084 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend pagetwo
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server 54_169_16_202_8380 54.169.16.202:8380 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend ebusin
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 54.169.16.202:8480 cookie 2 check inter 2000 rise 2 fall 5 weight 10 backend callbackicon
mode http
option httplog
cookie SERVERID rewrite
balance roundrobin
option httpclose
option forwardfor
option originalto
server ngsteam_1 127.0.0.1:8084 cookie 1 check inter 2000 rise 2 fall 5 weight 10 listen admin_stats 0.0.0.0:81
mode http
stats refresh 30s
stats uri /admin
stats realm admin\haproxy
stats auth admin:8-mkXjpO # errorloc 502 http://192.168.114.58/error502.html
# errorfile 503 /etc/haproxy/errors/503.http

  

haproxy.cfg的更多相关文章

  1. 关于Haproxy安装和配置:负载配置【haproxy.cfg】问题记录

    1.  存放地址: more /etc/haproxy/haproxy.cfg ps -ef | grep haproxy 看看有没有haproxy的进程就是了 或者看看服务器的23306的端口有没有 ...

  2. python操作haproxy.cfg文件

    需求 1.查 输入:www.oldboy.org 获取当前backend下的所有记录 2.新建 输入: arg = { 'bakend': 'www.oldboy.org', 'record':{ ' ...

  3. [笔记]HAproxy reload config file with uninterrupt session

    HAProxy is a high performance load balancer. It is very light-weight, and free, making it a great op ...

  4. 利用HAProxy代理SQL Server的AlwaysOn辅助副本

    利用HAProxy代理SQL Server的AlwaysOn辅助副本 公司最近数据库升级到SQL Server2014 ,并部署了alwayson高可用集群 机房内有三套程序需要读取数据库 第一套:主 ...

  5. Mysql的Haproxy反向代理和负载均衡

    HaProxy提供高可用性.负载均衡以及基于TCP和HTTP应用的代理,支持虚拟主机,它是免费.快速并且可靠的一种解决方案.应用到Haproxy主要是因为他免费,并且基于TCP和HTTP的应用代理. ...

  6. 对比Haproxy和Nginx负载均衡效果

    为了对比Hproxy和Nginx负载均衡的效果,分别在测试机上(以下实验都是在单机上测试的,即负载机器和后端机器都在一台机器上)做了这两个负载均衡环境,并各自抓包分析.下面说下这两种负载均衡环境下抓包 ...

  7. haproxy windows环境使用

    haproxy下载:http://pan.baidu.com/s/1miEvQUc 测试环境说明: ip地址 作用 开放端口 备注 nbproc 1 daemon defaults mode tcp ...

  8. HAproxy的安装与配置讲解

    1,安装 官网下载 http://www.haproxy.org/#down cd /usr/local/src/ wget http://www.haproxy.org/download/1.4/s ...

  9. HAProxy的安装与使用

    在互联网时代中,后台系统架构,经常可以听到高可用集群.负载均衡集群之类的系统架构解决方案,其中,负载均衡有基于硬件的F5.Big-IP等,也有基于软件的LVS(基于Linux操作系统实现,性能可以和基 ...

随机推荐

  1. Qt之SQL数据库

    ---------------------------- http://blog.csdn.net/reborntercel/article/details/6991147 http://blog.c ...

  2. html readme

    取html页面高度 document.documentElement.scrollHeight在IE和Chrome下,可以正常取到合适的全文高度,但是firefox下取到的则过高: 用document ...

  3. OpenGL学习笔记之了解OpenGL

    OpenGL(全写Open GraphicsLibrary)是个定义了一个跨编程语言.跨平台的编程接口规格的专业的图形程序接口.它用于三维图像(二维的亦可),是一个功能强大,调用方便的底层图形库. 说 ...

  4. 团队项目的NABC

    我们团队项目是做一个基于PC端的截屏软件,我觉得一个好的截屏软件需要具备磁性吸附的功能.当你需要对某个图像或者是其他的什么截屏的时候,精度比较高,不需要那些边框外的东西,磁性吸附就是在你选中的时候尽管 ...

  5. struts2 action获取ajax提交数据中文乱码问题

    有个人和我问题相同,地址在这: 解决方法: 在ajax的属性添加这句:contentType:'application/x-www-form-urlencoded; charset=utf-8',

  6. An overview of the Spring MVC request flow

    The Spring MVC request flow in short: When we enter a URL in the browser, the request comes to the d ...

  7. 【长期兼职】每天3小时写作=每月4000元外快(IT兼职写手)

    只要你有经验,每周平均有20来个小时的兼职时间. 只要你愿意静静地写一些心得总结. 那么就可以联系我QQ164349714,敲门:写作. 地址不限.特长不限.学历不限.年龄不限. 主要写作方向:1.投 ...

  8. curl get started

    -v 显示整个通信过程 -L 自动处理目标网址的自动跳转如301跳转 -i 显示头部信息 -d 发送表单信息 -X HTTP动词 -F 文件上传 -A User Agent字段 -b cookie - ...

  9. openwrt的交叉编译

    默认情况下,openwrt编译脚本会自动从Internet上获取所需要的软件包源代码,并把下载的源码包存放在当前目录的 dl/ 目录中:  在 build_dir/ 目录中存放编译中使用的软件包,   ...

  10. .NET设计模式(13):享元模式(Flyweight Pattern)(转)

    摘要:面向对象的思想很好地解决了抽象性的问题,一般也不会出现性能上的问题.但是在某些情况下,对象的数量可能会太多,从而导致了运行时的代价.那么我们如何去避免大量细粒度的对象,同时又不影响客户程序使用面 ...