版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
負(fù)載均衡基本原理王文angwnb@單臺(tái)服務(wù)器到多臺(tái)服務(wù)器的轉(zhuǎn)變InternetBIG-IPLTMsClientsServersClientsInternetServers什么是服務(wù)器負(fù)載均衡12345678ClientsClientsInternet虛擬服務(wù)器與網(wǎng)絡(luò)地址轉(zhuǎn)換
VirtualServer&NAT真實(shí)服務(wù)器RealServer網(wǎng)絡(luò)地址轉(zhuǎn)換VirtualServerAddress7:80Internet:8080:8080:8080:8080RealServerAddress7:80Internet虛擬服務(wù)器數(shù)據(jù)流-Packet#1Internet:8080:8080:808:8080域名IP地址7VirtualServerAddress7:80數(shù)據(jù)流-Packet#1LTM根據(jù)負(fù)載均衡把數(shù)據(jù)包的目的地址轉(zhuǎn)換成Node的地址InternetPacket#1Src-0:4003Dest–7:80:8080:8080:8080:8080Packet#1Src–0:4003Dest–:808007:80數(shù)據(jù)流–Packet#1響應(yīng)包
LTM把數(shù)據(jù)包的源地址轉(zhuǎn)換成VirtualServer地址InternetPacket#1-returnDest-0:4003Src–7:80:8080Packet#1-returnDest–0:4003Src–:808007:80:8080:8080:8080數(shù)據(jù)流-Packet#2InternetPacket#2Src-1:4003Dest–7:80:8080Packet#2Src–1:4003Dest–:808017:80:8080:8080:8080數(shù)據(jù)流–Packet#2回包
InternetPacket#2-returnDest-1:4003Src–7:80:8080Packet#2-returnDest–1:4003Src–:808017:80:8080:8080:8080數(shù)據(jù)流-Packet#3InternetPacket#3Src-5:4003Dest–7:80:8080Packet#3Src–5:4003Dest–:808057:80:8080:8080:8080數(shù)據(jù)流–Packet#3回包
InternetPacket#3-returnDest-5:4003Src–7:80:8080Packet#3-returnDest–5:4003Src–:808057:8080:8080:8080ConnectionTable連接表SrcIPAddressVirtualServerRealServer0:40037:80:80801:40037:80:8080………0:40057:80:80801:40087:80:80805:40037:80:8080SrcIPAddressVirtualServer0:40037:801:40037:80……0:40057:801:40087:805:40037:80客戶(hù)端Netstat-na負(fù)載均衡器BconnConnectionTable連接表SrcIPAddressVirtualServerRealServer0:40037:80:80801:40037:80:8080………0:40057:80:80801:40087:80:80805:40037:80:8080SrcIPAddressRealServer0:4003:80801:4003:8080……0:4005:80801:4008:80805:4003:8080服務(wù)器端Netstat-na負(fù)載均衡器BconnF5負(fù)載均衡的基本構(gòu)件
Pool、PoolMembers與NodesInternet:8080:80:4002:80PoolMembersNodes是指PoolMembers的IPAddressPools,PoolMembersandNodesNode=IPaddress:80:80:80PoolMember
=Node+PortPool
=GroupofpoolmembersPoolMembers的端口與地址問(wèn)題Internet:8080:80:4002VirtualServer7:80PoolMembers注意:1、PoolMember的端口可以不一樣2、PoolMember不一定需要與BIG-IP相連或在同一網(wǎng)段3、一個(gè)Pool中PoolMember的數(shù)量不受限,現(xiàn)網(wǎng)有達(dá)上百個(gè)的實(shí)例:80/24/24路由器虛擬服務(wù)器VirtualServerInternet:8080:4002:80VirtualServerIPAddress+Service(Port)區(qū)分端口可以為Any(0)準(zhǔn)備了負(fù)載均衡器是否需要對(duì)流過(guò)的網(wǎng)絡(luò)流量作處理一般與Pool相關(guān)聯(lián)一臺(tái)負(fù)載均衡器支持的Virtualserver的數(shù)量不受限,現(xiàn)網(wǎng)有達(dá)上千個(gè)的實(shí)例7:80如何選擇服務(wù)器--負(fù)載均衡算法RoundRobinRatioLeastConnectionsFastestObservedPredictiveDynamicRatioPriorityGroupActivationFallbackHostStaticDynamicFailureMechanisms輪詢(xún)--RoundRobinClientsRouterBIG-IPLTMControllerServersClientrequestsaredistributedevenly12345678Internet比率--RatioClientsRouterBIG-IPLTMControllerServersAdministratorsetsratiofordistributingClientrequests3:2:1:11234891011Internet571214613最小連接數(shù)--LeastConnectionsClientsRouterBIG-IPLTMControllerServers12InternetNextrequestsgoestoNodewithfewestopenconnections459460461470CurrentConnections3456最小連接數(shù)--LeastConnectionsClientsRouterBIG-IPLTMControllerServersInternetSometimelater,numberofconnectionschange6163280290111112CurrentConnections62最快回應(yīng)--FastestClientsRouterBIG-IPLTMControllerServersNextrequestsgotoNodewithfastestresponsetime25Internet10ms10ms10ms17msCurrentResponseTimes1436最快回應(yīng)--FastestClientsRouterBIG-IPLTMControllerServersSometimelater,responsetimeschange102104Internet10ms10ms7ms7msCurrentResponseTimes101103服務(wù)器健康檢查HealthMonitors
如何識(shí)別不可用的服務(wù)器
Internet:80服務(wù)健康檢查MonitorConcepts網(wǎng)絡(luò)連通性檢查AddressCheckNode–IPAddress端口ServiceCheckIP:port內(nèi)容檢查ContentCheckIP:portpluscheckdatareturned交互式檢查InteractiveCheck網(wǎng)絡(luò)連通性檢查--AddressCheckStepsPacketssenttoIPAddressesIfnoresponse,thennotrafficsenttomembersusingthatnodeaddressExample-ICMPInternetICMP服務(wù)端口檢查--ServiceCheckStepsOpensTCPconnection(IPAddress:service)ConnectionclosedIfTCPconnectionfails,thennotrafficsenttoassociatedMembersExample–TCPInternet:80:80:80TCPConnection內(nèi)容檢查--ContentCheckInternet:80:80:80StepsOpensTCPconnection(IPAddress:service)SendsarequestResponsereturnsdataConnectionclosedIfReceiveRulenotfoundindata,thennotrafficsenttoassociatedMembersExample–httphttpGET/交互式檢查--InteractiveCheckInternet:80:80:80StepsOpensTCPconnection(IPAddress:service)Interactiveconversationtosimulatereal-worldConnectionclosedIfexpectedresultsdonotoccur,thennotrafficsenttoassociatedMembersExample–SQLrequestconversation會(huì)話保持Persistence123123ConnectionTable連接表SrcIPAddressVirtualServerRealServer0:40037:80:80801:40037:80:8080………0:40057:80:80801:40087:80:80805:40037:80:8080SrcIPAddressRealServer0:4003:80801:4003:8080……0:4005:80801:4008:80805:4003:8080服務(wù)器端Netstat-na負(fù)載均衡器BconnSourceAddressPersistenceTableSrcIPAddressVirtualServerRealServer0:40037:80:80801:40037:80:8080………0:40057:80:8080???1:40087:80:8080???5:40037:80:8080SrcIPAddressRealServer01……5PersistenceTable負(fù)載均衡器源地址會(huì)話保持--SourceAddressPersistence根據(jù)client的源P地址Netmask->AddressRange12312301IfNetmaskis07CookiePersistenceInsertmodeBIG-IPLTMInsertsacookieintothestreamRewritemodeWebservercreatescookieandBIG-IPLTMchangesitPassivemodeWebservercreatescookieandBIG-IPLTMreadsitClientServerHTTPrequest(nospecialcookie)TCPhandshakeTCPhandshakeHTTPrequest(nospecialcookie)HTTPreply(nospecialcookie)HTTPreply(withinsertedcookie)pick
serverHTTPrequest(withsamecookie)TCPhandshakeTCPhandshakeHTTPrequest(nospecial
cookie)HTTPreply(nospecialcookie)HTTPreply(updatedcookie)cookie
specifies
serverFirstHitSecondHitCookieInsertMode源地址轉(zhuǎn)換SNATs
Internet02多對(duì)一的轉(zhuǎn)換Many-to-onemappingTraffictoSNATAddressisrefusedCanshareIPwithVirtualServerSNATs–典型數(shù)據(jù)流
Internet02:400103:8002:3300103:80源地址會(huì)轉(zhuǎn)換成SNAT的地址請(qǐng)注意源端口Server03:80SNATs–數(shù)據(jù)流的回包
InternetSNATIPAddress0203:80:400103:80
02:33001數(shù)據(jù)流的回應(yīng)包地址會(huì)轉(zhuǎn)換回來(lái)Server03:80SNATTable
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年河北省職工醫(yī)學(xué)院附屬醫(yī)院高層次衛(wèi)技人才招聘筆試歷年參考題庫(kù)頻考點(diǎn)附帶答案
- 2024年中國(guó)漁網(wǎng)浮球市場(chǎng)調(diào)查研究報(bào)告
- 2025年度婚姻財(cái)產(chǎn)共管與家庭責(zé)任分擔(dān)協(xié)議3篇
- 2024年中國(guó)流體磁化器市場(chǎng)調(diào)查研究報(bào)告
- 2024年中國(guó)沙棗市場(chǎng)調(diào)查研究報(bào)告
- 2025年度服裝定制合同標(biāo)的:制服2篇
- 《生物倍增工藝處理低碳氮比城市污水脫氮效能的研究》
- 2024年中國(guó)巖石Ⅴ型鐵架市場(chǎng)調(diào)查研究報(bào)告
- 2024年千層筒冰淇淋項(xiàng)目可行性研究報(bào)告
- 2025年度水電工程勞務(wù)承包與合同終止合同3篇
- 江蘇省鹽城市、南京市2024-2025學(xué)年度第一學(xué)期期末調(diào)研測(cè)試高三政治試題(含答案)
- 中央2024年住房和城鄉(xiāng)建設(shè)部信息中心招聘3人筆試歷年典型考點(diǎn)(頻考版試卷)附帶答案詳解
- ISO 56001-2024《創(chuàng)新管理體系-要求》專(zhuān)業(yè)解讀與應(yīng)用實(shí)踐指導(dǎo)材料之19:“7支持-7.2能力”(雷澤佳編制-2025B0)
- 2024秋新商務(wù)星球版地理7年級(jí)上冊(cè)教學(xué)課件 第5章 地球表層的人文環(huán)境要素 第4節(jié) 發(fā)展差異與區(qū)際聯(lián)系
- 2025學(xué)年人教新版英語(yǔ)七下Unit1隨堂小測(cè)
- 2024版教育培訓(xùn)機(jī)構(gòu)店面轉(zhuǎn)讓及課程合作協(xié)議3篇
- 《BL急性腎盂腎炎》課件
- 2024-2025學(xué)年上學(xué)期上海小學(xué)語(yǔ)文六年級(jí)期末模擬試卷
- 公共衛(wèi)生人員分工及崗位職責(zé)
- 2024年10月自考13658工業(yè)設(shè)計(jì)史論試題及答案
- 行政前臺(tái)年終總結(jié)述職報(bào)告
評(píng)論
0/150
提交評(píng)論