版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
負(fù)載均衡基本原理王文angwnb@單臺服務(wù)器到多臺服務(wù)器的轉(zhuǎn)變InternetBIG-IPLTMsClientsServersClientsInternetServers什么是服務(wù)器負(fù)載均衡12345678ClientsClientsInternet虛擬服務(wù)器與網(wǎng)絡(luò)地址轉(zhuǎn)換
VirtualServer&NAT真實服務(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客戶端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的端口與地址問題Internet:8080:80:4002VirtualServer7:80PoolMembers注意:1、PoolMember的端口可以不一樣2、PoolMember不一定需要與BIG-IP相連或在同一網(wǎng)段3、一個Pool中PoolMember的數(shù)量不受限,現(xiàn)網(wǎng)有達(dá)上百個的實例:80/24/24路由器虛擬服務(wù)器VirtualServerInternet:8080:4002:80VirtualServerIPAddress+Service(Port)區(qū)分端口可以為Any(0)準(zhǔn)備了負(fù)載均衡器是否需要對流過的網(wǎng)絡(luò)流量作處理一般與Pool相關(guān)聯(lián)一臺負(fù)載均衡器支持的Virtualserver的數(shù)量不受限,現(xiàn)網(wǎng)有達(dá)上千個的實例7:80如何選擇服務(wù)器--負(fù)載均衡算法RoundRobinRatioLeastConnectionsFastestObservedPredictiveDynamicRatioPriorityGroupActivationFallbackHostStaticDynamicFailureMechanisms輪詢--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
如何識別不可用的服務(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會話保持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ù)載均衡器源地址會話保持--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多對一的轉(zhuǎn)換Many-to-onemappingTraffictoSNATAddressisrefusedCanshareIPwithVirtualServerSNATs–典型數(shù)據(jù)流
Internet02:400103:8002:3300103:80源地址會轉(zhuǎn)換成SNAT的地址請注意源端口Server03:80SNATs–數(shù)據(jù)流的回包
InternetSNATIPAddress0203:80:400103:80
02:33001數(shù)據(jù)流的回應(yīng)包地址會轉(zhuǎn)換回來Server03:80SNATTable
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年滬科版九年級化學(xué)下冊階段測試試卷
- 商業(yè)環(huán)境下的學(xué)生職業(yè)規(guī)劃與心理健康
- 醫(yī)療設(shè)備中安全硬件的研發(fā)與市場前景分析
- 2025中國鐵路北京局集團限公司招聘4982人(一)高頻重點提升(共500題)附帶答案詳解
- 2025中國郵政集團公司重慶分公司社會招聘536人高頻重點提升(共500題)附帶答案詳解
- 2025中國紙業(yè)投資限公司社會招聘6人高頻重點提升(共500題)附帶答案詳解
- 2025中國社會科學(xué)院美國研究所第一批專業(yè)技術(shù)人員公開招聘補充高頻重點提升(共500題)附帶答案詳解
- 2025中國電信湖北黃岡分公司招聘30人高頻重點提升(共500題)附帶答案詳解
- 2025中國新聞社應(yīng)屆高校畢業(yè)生公開招聘補充高頻重點提升(共500題)附帶答案詳解
- 2025中國國際工程咨詢限公司總部社會招聘20人高頻重點提升(共500題)附帶答案詳解
- GB/T 30595-2024建筑保溫用擠塑聚苯板(XPS)系統(tǒng)材料
- 2024年人教版八年級地理上冊期末考試卷(附答案)
- 醫(yī)學(xué)免疫學(xué)-醫(yī)學(xué)檢驗專業(yè)學(xué)習(xí)通超星期末考試答案章節(jié)答案2024年
- 《稻草人》閱讀題及答案
- 獨立基礎(chǔ)土方開挖施工方案
- (建筑工程管理)常熟市建設(shè)工程施工圖審查工作
- 瑜伽基礎(chǔ)知識題庫單選題100道及答案解析
- 廣東省廣州市2024年中考數(shù)學(xué)真題試卷(含答案)
- 【中圖】八上地理知識點總結(jié)
- 2024年資格考試-注冊質(zhì)量經(jīng)理考試近5年真題附答案
- 密碼行業(yè)職業(yè)技能競賽參考試題及答案
評論
0/150
提交評論