鍩轰簬Haproxy鏋勫缓璐熻浇鍧囪 闆嗙兢

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了鍩轰簬Haproxy鏋勫缓璐熻浇鍧囪 闆嗙兢相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/%e6%9c%8d%e5%8a%a1%e6%8e%a7%e5%88%b6' title='鏈嶅姟鎺у埗'>鏈嶅姟鎺у埗   tcp   鏈哄埗   lvs   鑷姩   gre   ide   鍚姩鑴氭湰   

1銆丠APROXY绠€浠?/strong>

HAProxy鎻愪緵楂樺彲鐢ㄦ€с€佽礋杞藉潎琛′互鍙婂熀浜嶵CP鍜孒TTP搴旂敤鐨勪唬鐞嗭紝鏀寔铏氭嫙涓绘満锛屽畠鏄厤璐广€佸揩閫熷苟涓斿彲闈犵殑涓€绉嶈礋杞藉潎琛¤В鍐虫柟妗堛€侶AProxy鐗瑰埆閫傜敤浜庨偅浜涜礋杞界壒澶х殑web绔欑偣锛岃繖浜涚珯鐐归€氬父鍙堥渶瑕佷細璇濅繚鎸佹垨涓冨眰澶勭悊銆侶AProxy杩愯鍦ㄥ綋鍓嶇殑纭欢涓婏紝瀹屽叏鍙互鏀寔鏁颁互涓囪鐨勫苟鍙戣繛鎺ャ€傚苟涓斿畠鐨勮繍琛屾ā寮忎娇寰楀畠鍙互寰堢畝鍗曞畨鍏ㄧ殑鏁村悎杩涙偍褰撳墠鐨勬灦鏋勪腑锛屽悓鏃跺彲浠ヤ繚鎶や綘鐨剋eb鏈嶅姟鍣ㄤ笉琚毚闇插埌缃戠粶涓娿€?/strong>

瀹樼綉锛歨ttp://www.haproxy.com

 

2銆丠AProxy鐨勭壒鐐规槸锛?/strong>
1銆丠AProxy鏀寔铏氭嫙涓绘満銆?br />2銆丠AProxy鐨勪紭鐐硅兘澶熻ˉ鍏匩ginx鐨勪竴浜涚己鐐癸紝姣斿鏀寔Session鐨勪繚鎸侊紝Cookie鐨勫紩瀵硷紱鍚屾椂鏀寔閫氳繃鑾峰彇鎸囧畾鐨剈rl鏉ユ娴嬪悗绔湇鍔″櫒鐨勭姸鎬併€?/strong>
3銆丠AProxy璺烲VS绫讳技锛屾湰韬氨鍙槸涓€娆捐礋杞藉潎琛¤蒋浠讹紱鍗曠函浠庢晥鐜囦笂鏉ヨHAProxy浼氭瘮Nginx鏈夋洿鍑鸿壊鐨勮礋杞藉潎琛¢€熷害锛屽湪骞跺彂澶勭悊涓婁篃鏄紭浜嶯ginx鐨勩€?br />4銆丠AProxy鏀寔TCP鍗忚鐨勮礋杞藉潎琛¤浆鍙?/strong>锛屽彲浠ュMySQL璇昏繘琛岃礋杞藉潎琛★紝瀵瑰悗绔殑MySQL鑺傜偣杩涜妫€娴嬪拰璐熻浇鍧囪 锛屽彲浠ョ敤LVS+Keepalived瀵筂ySQL涓讳粠鍋氳礋杞藉潎琛°€?br />5銆丠AProxy璐熻浇鍧囪 绛栫暐闈炲父澶氾紝HAProxy鐨勮礋杞藉潎琛$畻娉曠幇鍦ㄥ叿浣撴湁濡備笅8绉嶏細
銆€銆€鈶?roundrobin锛岃〃绀虹畝鍗曠殑杞锛岃繖涓笉澶氳锛岃繖涓槸璐熻浇鍧囪 鍩烘湰閮藉叿澶囩殑锛?br />銆€銆€鈶?static-rr锛岃〃绀烘牴鎹潈閲嶏紝寤鸿鍏虫敞锛?br />銆€銆€鈶?leastconn锛岃〃绀烘渶灏戣繛鎺ヨ€呭厛澶勭悊锛屽缓璁叧娉紱
銆€銆€鈶?source锛岃〃绀烘牴鎹姹傛簮IP锛岃繖涓窡Nginx鐨処P_hash鏈哄埗绫讳技锛屾垜浠敤鍏朵綔涓鸿В鍐硈ession闂鐨勪竴绉嶆柟娉曪紝寤鸿鍏虫敞锛?br />銆€銆€鈶?ri锛岃〃绀烘牴鎹姹傜殑URI锛?br />銆€銆€鈶?rl_param锛岃〃绀烘牴鎹姹傜殑URl鍙傛暟’balance url_param’ requires an URL parameter name锛?br />銆€銆€鈶?hdr(name)锛岃〃绀烘牴鎹瓾TTP璇锋眰澶存潵閿佸畾姣忎竴娆TTP璇锋眰锛?br />銆€銆€鈶?rdp-cookie(name)锛岃〃绀烘牴鎹嵁cookie(name)鏉ラ攣瀹氬苟鍝堝笇姣忎竴娆CP璇锋眰銆?/p>

 

3銆乭aproxy 閰嶇疆涓垎鎴愪簲閮ㄥ垎鍐呭璇﹁В

1銆乬lobal锛氬弬鏁版槸杩涚▼绾х殑锛岄€氬父鏄拰鎿嶄綔绯荤粺鐩稿叧銆傝繖浜涘弬鏁颁竴鑸彧璁剧疆涓€娆★紝濡傛灉閰嶇疆鏃犺锛屽氨涓嶉渶瑕佸啀娆¤繘琛屼慨鏀?/em>

2銆乨efaults锛氶厤缃粯璁ゅ弬鏁帮紝杩欎簺鍙傛暟鍙互琚敤鍒癴rontend锛宐ackend锛孡isten缁勪欢

3銆乫rontend锛氭帴鏀惰姹傜殑鍓嶇铏氭嫙鑺傜偣锛孎rontend鍙互鏇村姞瑙勫垯鐩存帴鎸囧畾鍏蜂綋浣跨敤鍚庣鐨刡ackend

4銆乥ackend锛氬悗绔湇鍔¢泦缇ょ殑閰嶇疆锛屾槸鐪熷疄鏈嶅姟鍣紝涓€涓狟ackend瀵瑰簲涓€涓垨鑰呭涓疄浣撴湇鍔″櫒

5銆丩isten Fronted鍜宐ackend鐨勭粍鍚堜綋

4銆佹渚嬬幆澧冿細

涓绘満            鎿嶄綔绯荤粺                     IP鍦板潃                  涓昏鐨勮蒋浠?br />----------------------------------------------------------------------------
Haproxy 銆€  CentOS6.6 x86_64 銆€ 192.168.200.111  haproxy
nginx1 銆€銆€ CentOS6.6 x86_64 銆€ 192.168.200.112  nginx
Nginx2 銆€銆€ CentOS6.6 x86_64 銆€ 192.168.200.113  nginx

5銆佸畨瑁呴厤缃瓾aproxy

5.1 瀹夎Haproxy渚濊禆鍖呭強婧愮爜鍖呯紪璇戝畨瑁?/p>

[root@localhost ~]# yum -y install gcc gcc-c++ make pcre-devel bzip2-devel
[root@localhost ~]# tar xf haproxy-1.4.24.tar.gz -C /usr/src/
[root@localhost ~]# cd /usr/src/haproxy-1.4.24/
[root@localhost haproxy-1.4.24]# make TARGET=linux26 && make install

5.2 寤虹珛haproxy鐨勯厤缃洰褰曞強鏂囦欢

[root@localhost haproxy-1.4.24]# mkdir /etc/haproxy
[root@localhost haproxy-1.4.24]# cp examples/haproxy.cfg /etc/haproxy/

5.3 haproxy閰嶇疆椤圭殑浠嬬粛

###########鍏ㄥ眬閰嶇疆#########
global
 log 127.0.0.1 local0           #鏃ュ織杈撳嚭閰嶇疆锛屾墍鏈夋棩蹇楅兘璁板綍鍦ㄦ湰鏈虹郴缁熸棩蹇楋紝閫氳繃local0杈撳嚭
 log 127.0.0.1 local1 notice    銆€銆€銆€銆€ #notice涓烘棩蹇楃骇鍒紝閫氬父鏈?4涓骇鍒紙error warringinfo debug锛?/code>
 nbproc 1   銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€ #璁剧疆杩涚▼鏁伴噺锛岄€氬父鏄疌PU鏍稿績鏁版垨鑰?鍊?/code>
 pidfile /etc/haproxy/haproxy.pid       #haproxy 杩涚▼PID鏂囦欢
 maxconn 4096               #鏈€澶ц繛鎺ユ暟(闇€鑰冭檻ulimit-n闄愬埗 )
 #chroot /usr/share/haproxy             #chroot杩愯璺緞
 uid 99                 #鐢ㄦ埛uid
 gid 99                 #鐢ㄦ埛gid
 daemon             銆€銆€銆€銆€ #瀹堟姢杩涚▼妯″紡锛屼互鍚庡彴鏈嶅姟褰㈠紡鍏佽
 #debug                                 #haproxy 璋冭瘯绾у埆锛屽缓璁彧鍦ㄥ紑鍚崟杩涚▼鐨勬椂鍊欒皟璇?nbsp;
 
########榛樿閰嶇疆############
defaults
 log global                 #瀹氫箟鏃ュ織涓篻lobal閰嶇疆涓殑鏃ュ織瀹氫箟
 mode http              銆€銆€銆€銆€ #榛樿鐨勬ā寮弇ode { tcp|http|health }锛宼cp鏄?灞傦紝http鏄?灞傦紝health鍙細杩斿洖OK
 option httplog         銆€銆€銆€銆€ #鏃ュ織绫诲埆锛岄噰鐢╤ttp鏃ュ織鏍煎紡璁板綍鏃ュ織
 #option  dontlognull     銆€銆€銆€銆€銆€銆€銆€銆€#涓嶈褰曞仴搴锋鏌ユ棩蹇椾俊鎭?nbsp;            
 retries 3              #妫€鏌ヨ妭鐐规湇鍔″櫒澶辫触娆℃暟锛岃繛缁揪鍒颁笁娆″け璐ワ紝鍒欒涓鸿妭鐐逛笉鍙敤
 #option  forwardfor   銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€#濡傛灉鍚庣鏈嶅姟鍣ㄩ渶瑕佽幏寰楀鎴风鐪熷疄ip闇€瑕侀厤缃殑鍙傛暟锛屽彲浠ヤ粠Http Header涓幏寰楀鎴风i
 #option  httpclose                     #姣忔璇锋眰瀹屾瘯鍚庝富鍔ㄥ叧闂環ttp閫氶亾,haproxy涓嶆敮鎸乲eep-alive,鍙兘妯℃嫙杩欑妯″紡鐨勫疄鐜?/code>
 maxconn 4096               #鏈€澶ц繛鎺ユ暟
 contimeout 5000            #杩炴帴瓒呮椂鏃堕棿
 clitimeout 50000           #瀹㈡埛绔秴鏃舵椂闂?/code>
 srvtimeout 50000           #鏈嶅姟鍣ㄨ秴鏃舵椂闂?/code>
 #timeout check 2000      銆€銆€銆€銆€銆€銆€銆€銆€#蹇冭烦妫€娴嬭秴鏃?/code>
 #timeout http-keep-alive10s   銆€銆€銆€銆€  #榛樿鎸佷箙杩炴帴瓒呮椂鏃堕棿
 #timeout http-request   10s    銆€銆€銆€銆€ #榛樿http璇锋眰瓒呮椂鏃堕棿
 #timeoutqueue          1m    銆€銆€銆€銆€   #榛樿闃熷垪瓒呮椂鏃堕棿
  ########缁熻椤甸潰閰嶇疆########
listen admin_stats
   bind 0.0.0.0:1080 銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€#璁剧疆Frontend鍜孊ackend鐨勭粍鍚堜綋锛岀洃鎺х粍鐨勫悕绉帮紝鎸夐渶瑕佽嚜瀹氫箟鍚嶇О
   mode http 銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€  #http鐨?灞傛ā寮?
   option httplog 銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€  #閲囩敤http鏃ュ織鏍煎紡
   #log 127.0.0.1 local0 err 銆€銆€銆€銆€銆€銆€銆€ #閿欒鏃ュ織璁板綍
銆€銆€maxconn 10 銆€銆€銆€銆€銆€銆€銆€銆€ 銆€銆€銆€銆€    #榛樿鐨勬渶澶ц繛鎺ユ暟
銆€銆€stats refresh 30s 銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€ #缁熻椤甸潰鑷姩鍒锋柊鏃堕棿
銆€銆€stats uri /stats                                 #缁熻椤甸潰url
銆€銆€stats realm Crushlinux Haproxy 銆€銆€銆€銆€#缁熻椤甸潰瀵嗙爜妗嗕笂鎻愮ず鏂囨湰
銆€銆€stats auth admin:admin 銆€銆€銆€銆€銆€銆€銆€銆€#璁剧疆鐩戞帶椤甸潰鐨勭敤鎴峰拰瀵嗙爜:admin,鍙互璁剧疆澶氫釜鐢ㄦ埛鍚?
銆€銆€stats hide-version 銆€銆€銆€銆€銆€銆€銆€銆€       #闅愯棌缁熻椤甸潰涓奌AProxy鐨勭増鏈俊鎭?
銆€銆€#stats admin if TRUE 銆€銆€銆€銆€銆€銆€銆€銆€銆€   #璁剧疆鎵嬪伐鍚姩/绂佺敤锛屽悗绔湇鍔″櫒(haproxy-1.4.9浠ュ悗鐗堟湰)
 
########璁剧疆haproxy 閿欒椤甸潰#####
銆€銆€errorfile 403 /home/haproxy/haproxy/errorfiles/403.http
銆€銆€errorfile 500 /home/haproxy/haproxy/errorfiles/500.http
銆€銆€errorfile 502 /home/haproxy/haproxy/errorfiles/502.http
銆€銆€errorfile 503 /home/haproxy/haproxy/errorfiles/503.http
銆€銆€errorfile 504 /home/haproxy/haproxy/errorfiles/504.http
 
########frontend鍓嶇閰嶇疆##############
bibind *:80 銆€銆€#杩欓噷寤鸿浣跨敤bind *:80鐨勬柟寮忥紝瑕佷笉鐒跺仛闆嗙兢楂樺彲鐢ㄧ殑鏃跺€欐湁闂锛寁ip鍒囨崲鍒板叾浠栨満鍣ㄥ氨涓嶈兘璁块棶浜嗐€?
銆€銆€acl web hdr(host) -i www.abc.com 銆€銆€#acl鍚庨潰鏄鍒欏悕绉帮紝-i鏄璁块棶鐨勫煙鍚嶏紝
銆€銆€acl img hdr(host) -i img.abc.com 銆€銆€銆€ #濡傛灉璁块棶www.abc.com杩欎釜鍩熷悕灏卞垎鍙戝埌涓嬮潰鐨剋ebserver 鐨勪綔鐢ㄥ煙銆?
銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€ #濡傛灉璁块棶img.abc.com.cn灏卞垎鍙戝埌imgserver杩欎釜浣滅敤鍩熴€?
銆€銆€use_backend webserver if web
銆€銆€use_backend imgserver if img
 
########backend鍚庣閰嶇疆##############
backend webserver 銆€銆€銆€  #webserver浣滅敤鍩?
銆€銆€mode http
銆€銆€balance roundrobin 銆€銆€#banlance roundrobin 杞锛宐alance source 淇濆瓨session鍊硷紝鏀寔static-rr锛宭eastconn锛宖irst锛寀ri绛夊弬鏁?
銆€銆€option httpchk /index.html HTTP/1.0 銆€銆€ #鍋ュ悍妫€鏌ワ紝妫€娴嬫枃浠讹紝濡傛灉鍒嗗彂鍒板悗鍙癷ndex.html璁块棶涓嶅埌灏变笉鍐嶅垎鍙戠粰瀹?
銆€銆€server web1 192.168.200.103:80 cookie 1 weight 1 check inter 2000 rise 2 fall 3
銆€銆€server web2 192.168.200.104:80 cookie 2 weight 1 check inter 2000 rise 2 fall 3
銆€銆€#cookie 1琛ㄧずserverid涓?锛宑heck inter 1500 鏄娴嬪績璺抽鐜?
銆€銆€#rise 2鏄?娆℃纭涓烘湇鍔″櫒鍙敤锛宖all 3鏄?娆″け璐ヨ涓烘湇鍔″櫒涓嶅彲鐢紝weight浠h〃鏉冮噸
 
銆€銆€backend imgserver
銆€銆€mode http
銆€銆€option httpchk /index.php
銆€銆€balance roundrobin
銆€銆€server img01 192.168.200.105:80 check inter 2000 fall 3
銆€銆€server img02 192.168.200.106:80 check inter 2000 fall 3
 
########tcp閰嶇疆#################
listen test1
銆€銆€bind 0.0.0.0:90
銆€銆€mode tcp
銆€銆€option tcplog #鏃ュ織绫诲埆,閲囩敤tcplog
銆€銆€maxconn 4086
銆€銆€#log 127.0.0.1 local0 debug
銆€銆€server s1 192.168.200.107:80 weight 1
銆€銆€server s2 192.168.200.108:80 weight 1

銆€銆€

5.4 haproxy 閰嶇疆鏂囦欢淇敼

[root@localhost ~]# vim /etc/haproxy/haproxy.cfg
# 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 notice
    log /dev/log    local0 info
    log /dev/log    local0 notice
    maxconn 4096
    uid 99
    gid 99
    daemon
 
defaults
    log global
    mode    http
    option  httplog
    retries 3
    maxconn 4096
    contimeout  5000
    clitimeout  50000
    srvtimeout  50000
 
listen  webcluster 0.0.0.0:80
    option  httpchk GET /index.html
    balance roundrobin
    server  inst1 192.168.200.103:80 check inter 2000 fall 3
    server  inst1 192.168.200.104:80 check inter 2000 fall 3
 
listen admin_stats
    bind 0.0.0.0:8000
    mode http
    option httplog
    maxconn 100
    stats refresh 30s
    stats uri /stats
    stats realm Crushlinux Haproxy
        stats auth admin:admin
    stats hide-version

銆€銆€

5.5 鍑嗗鏈嶅姟鑷惎鍔ㄨ剼鏈?/p>

[root@localhost ~]# cp /usr/src/haproxy-1.4.24/examples/haproxy.init /etc/init.d/haproxy
[root@localhost ~]# ln -s /usr/local/sbin/haproxy /usr/sbin/haproxy
[root@localhost ~]# chmod +x /etc/init.d/haproxy
[root@localhost ~]# /etc/init.d/haproxy start

 

6銆佸畨瑁呴厤缃甒eb鏈嶅姟Nginx銆€銆€

6.1 棣栧厛鎼缓Nginx1锛?/p>

[root@localhost ~]# yum -y install gcc gcc-c++ make pcre-devel zlib-devel openssl-devel
[root@localhost ~]# useradd -M -s /sbin/nologin nginx
[root@localhost ~]# tar xf nginx-1.6.2.tar.gz -C /usr/src
[root@localhost ~]# cd /usr/src/nginx-1.6.2
[root@localhost nginx-1.6.2]# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx && make && make install
[root@localhost nginx-1.6.2]# cd /usr/local/nginx/html/
[root@localhost html]# echo "server 192.168.200.103" > index.html
[root@localhost html]# /usr/local/nginx/sbin/nginx
[root@localhost html]# netstat -anpt |grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4503/nginx

銆€銆€

6.2 鎼缓nginx2锛?鍚宯ginx1鎼缓鏂瑰紡鏄竴鏍风殑銆?br />涓?.1鍞竴涓嶅悓鐨勬槸锛?/p>

[root@localhost html]# echo "server 192.168.200.104" > index.html

 

娉ㄦ剰锛歯ginx鏈嶅姟鎺у埗鏂瑰紡

/usr/local/nginx/sbin/nginx 鍚姩鏈嶅姟
killall -s HUP nginx 閲嶆柊鍔犺浇鏈嶅姟
killall -s QUIT nginx 閫€鍑烘湇鍔?/p>

 

7銆佸鎴风璁块棶娴嬭瘯锛?/strong>
鐢ㄦ祻瑙堝櫒鎵撳紑 http://192.168.200.111
鎵撳紑涓€涓柊鐨勬祻瑙堝櫒鍐嶆璁块棶 http://192.168.200.111


鍙互楠岃瘉涓ゆ璁块棶鍒扮殑缁撴灉鍒嗗埆涓猴細
server 192.168.200.103
server 192.168.200.104

8銆丠aproxy 鏃ュ織

Haproxy 鐨勬棩蹇楅粯璁よ緭鍑哄埌绯荤粺鐨剆yslog涓紝涓轰簡鏇村ソ鐨勭鐞咹aproxy 鐨勬棩蹇楋紝鍦ㄧ敓浜х幆澧冧腑涓€鑸崟鐙畾涔夊嚭鏉ャ€?br />8.1 淇敼Haproxy閰嶇疆鏂囦欢涓叧浜庢棩蹇楅厤缃€夐」锛?em>

[root@localhost ~]# vim /etc/haproxy/haproxy.cfg
# 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 notice
     
    log /dev/log    local0 info
    log /dev/log    local0 notice
[root@localhost ~]# service haproxy restart

杩欎袱琛岄厤缃斁鍒癵lobal閫夐」涓紝涓昏鏄皢Haproxy鐨刬nfo鍜宯otice鏃ュ織鍒嗗埆璁板綍鍒颁笉鍚岀殑鏃ュ織鏂囦欢涓?/p>

8.2 淇敼rsyslog閰嶇疆
涓轰簡渚夸簬绠$悊锛屽皢Haproxy鐩稿叧鐨勯厤缃嫭绔嬪畾涔夊埌haproxy.conf 骞舵斁鍒?etc/rsyslog.d/ 涓嬶紝rsyslog鍚姩鏃朵細鑷姩鍔犺浇姝ょ洰褰曚笅鐨勬墍鏈夐厤缃枃浠躲€?/p>

[root@localhost ~]# vim /etc/rsyslog.d/haproxy.conf
if ($programname == 鈥榟aproxy鈥?/code> and $syslogserverity-text == 鈥榠nfo鈥?/code>) then -/var/log/haproxy/haproxy-info.log
&~
if ($programname == 鈥榟aproxy鈥?/code> and $syslogserverity-text == 鈥榥otice鈥?/code>) then -/var/log/haproxy/haproxy-notice.log
&~銆€銆€

灏唄aproxy鐨刬nfo鏃ュ織璁板綍鍒?var/log/haproxy/haproxy-info.log涓紝灏唍otice鏃ュ織璁板綍鍒?var/log/haproxy/haproxy-notice.log涓紝灏唍otice鏃ュ織璁板綍鍒?var/log/haproxy/haproxy-notice
&~ 琛ㄧず褰撳啓鍏ュ埌鏃ュ織鏂囦欢鍚庯紝rsyslog鍋滄澶勭悊杩欎釜淇℃伅锛岋紙rainerscript 鑴氭湰璇█锛?/p>

閲嶅惎rsyslog鏈嶅姟
[root@localhost ~]# service rsyslog restart

8.3 鏌ョ湅鏃ュ織鏂囦欢鏄惁鍒涘缓鎴愬姛

[root@localhost ~]# ls -l /var/log/haproxy/haproxy-info.log
[root@localhost ~]# ls -l /var/log/haproxy/haproxy-notice.log
 
Sep 20 23:39:26 localhost haproxy[2674]: 192.168.200.1:51629 [20/Sep/2015:23:38:27.256] web-cluster web-cluster/inst2 0/0/0/1/59740 200 1648 - - CD-- 0/0/0/0/0 0/0 "GET / HTTP/1.1"
Sep 20 23:40:06 localhost haproxy[2674]: 192.168.200.1:51693 [20/Sep/2015:23:39:34.423] web-cluster web-cluster/inst2 0/0/0/0/32120 200 580 - - ---- 1/1/1/1/0 0/0 "GET / HTTP/1.1"

8.4 鐘舵€佺粺璁″姛鑳芥祴璇?/p>

鎶€鏈浘鐗? src=

 

以上是关于鍩轰簬Haproxy鏋勫缓璐熻浇鍧囪 闆嗙兢的主要内容,如果未能解决你的问题,请参考以下文章

Linux璐熻浇鍧囪 鍜屼腑闂翠欢

璐熻浇鍧囪

璐熻浇鍧囪 涔?LVS

浜斿垎閽熺湅鎳?Nginx 璐熻浇鍧囪

nginx瀹炵幇璐熻浇鍧囪

2019.9.21 Tomcat缃戦〉浣嶇疆鐨勪慨鏀瑰強璐熻浇鍧囪

(c)2006-2024 SYSTEM All Rights Reserved IT常识