




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
TMXTechnicalTrainingServerLoadBalancing2023/8/8TMXTechnicalTrainingServerLObjectivesTounderstandServerLoadBalancingconcepts.TounderstandArrayServerLoadBalancingconfigurationsteps.2023/8/82ObjectivesTounderstandServerTopicsUnit1:BasicServerLoadBalancingConceptsandConfigurationUnit2:AdditionalServerLoadBalancingConceptsandConfigurationAppendix:WebConcepts2023/8/83TopicsUnit1:BasicServerLoaUnit1:BasicSLBConceptsWhatisServerLoadBalancing?SLBTerminologyArraySLBBenefitsSLBModesRealServicesSimpleGroupMethodsVirtualServicesSimplePolicyTypes2023/8/84Unit1:BasicSLBConceptsWhatWhatisLoadBalancing?It’sineverywhereactually!!!EmergencyClinicExpertClinicLoadBalancingAFEConnectionReuseSLB:PolicySLB:Method2023/8/85WhatisLoadBalancing?It’siWhatisServerLoadBalancing(SLB)?SLBallowswebsitestobescaledfromasingleservicetoagroupofservices(servicefarm)whiledistributingtheloadbetweentheservicesbasedontheirloadandhealth.SLBBenefitsGreaterscalabilityinthenumberofservicesforasitereducesloadonindividualservicesandimprovesresponsetimetoclientsImprovedresiliencythroughHealthCheckingofservices,services,andwebcontentBettercontrolofserviceresourceusagethroughimplementationofdifferentloadbalancingalgorithmsTrafficmanagementbasedonTCP/UDPportnumber,URL,HTTPHostHeader,Cookiecontent,orSSLSessionID2023/8/86WhatisServerLoadBalancingSLBTerminologyRealService(“Real”)RepresentsaphysicalservicewhichwillhandleclientrequestsRealServiceGroup(“Group”)RepresentsagroupofrealserviceswhichtrafficwillbedistributedtoDefineswhichloadbalancingalgorithmtouseVirtualService(“Virtual”)RepresentsavirtualservicethatclientscanconnecttoPolicyAssociatesrealservicegroupswithvirtualservicesservice1service5service4service3service2Real1Real3Real4Real5Real2Group1Group2Virtual1Virtual2Internet2023/8/87SLBTerminologyRealService(“ServerLoadBalancingExampleBasicServerLoadbalancingInternetServiceGroupRealservicesVirtualIP012345Userentersintheirbrowser.HostnamesenttoDNSforresolution.1DNSresolvestotheVirtualIPaddress(VIP)of0.2ClientsendsrequesttoVIP.3Arrayproxiesrequesttoselectedrealservice.4Furtherrequestsfromtheclientmaybesenttothesameoradifferentrealservice,dependingonpersistencyconfiguration.5DNS2023/8/88ServerLoadBalancingExampleBSLBModesServerLoadBalancingcanbeperformedintwomodes:ReverseProxyModeArrayTMproxiesallclientconnectionstorealservices.TransparentModeArrayTMtransparentlyproxiesallclientconnectionstorealservices.2023/8/89SLBModesServerLoadBalancingReverseProxyModePacketFlowClientconnectstoVIPonArrayTMandsendsrequesttoArrayTM.ArrayTMopensanewconnectiontorealserviceandsendsrequesttoservice.servicerespondstoArrayTM.ArrayTMrespondstoClient.VirtualInternetservice1service2InsideInterfaceOutsideInterface12342023/8/810ReverseProxyModePacketFlowVReverseProxyModeTranslationsVirtualInternetservice1service2InsideInterfaceOutsideInterface1234StepSourceIPSourcePortDestinationIPDestinationPort1Client-IPClient-PortVirtual-IPVirtual-Port2Inside-IPInside-PortReal-IPReal-Port3Real-IPReal-PortInside-IPInside-Port4Virtual-IPVirtual-PortClient-IPClient-Port2023/8/811ReverseProxyModeTranslationsReverseProxyModeBenefitsOne-armedtopologyispossible.ResponsesautomaticallyreturntotheArrayTM.Enablesconnectionpoolingforincreasedperformance.Limitationsservicelogsdonotshowrealclient’sIPaddress(connectionsproxied).Solution:EnablingX-Forwarded-Forheaderinsertionallowsclient’soriginalsourceIPaddresstobeinsertedintoHTTPrequestsbeforesendingtobackendrealservice.2023/8/812ReverseProxyModeBenefits2023ConnectionPoolingProvidesTCPaccelerationforbackendconnectionstorealservices.Arrayopensconnection(s)tobackendserviceasneededandleavesit(them)open.Arraysendsmultiplerequestsfromdifferentclientsthroughthesamebackendserviceconnection(s).Thissignificantlyreducesthenumberofclientconnectionsaservicehastohandle(typicallybyupto90%withcacheoff).Improvesserviceperformance.servicedoesn’tspendasmuchtimeperformingTCPsetups/teardowns.servicedoesn’tneedtokeepsomanyconnectionsopen.OnlypossiblewithReverseProxyMode.2023/8/813ConnectionPoolingProvidesTCPTransparentModePacketFlowClientsendsrequesttoVIPonArrayTM.ArrayTMforwardsrequesttorealservice,maintainingtheclient’sIP.RealservicereturnsresponseviaclientIP(handledbyArrayTM).ArrayTMforwardsresponsetoClient.VirtualIPInternetservice1service22354612023/8/814TransparentModePacketFlowVirTransparentModeTranslationsVirtualIPInternetservice1service2235461StepSourceIPSourcePortDestinationIPDestinationPort1Client-IPClient-PortVirtual-IPVirtual-Port23Client-IPClient-PortReal-IPReal-Port4Real-IPReal-PortClient-IPClient-Port56Virtual-IPVirtual-PortClient-IPClient-Port2023/8/815TransparentModeTranslationsViTransparentModeBenefitsservicelogswillshowactualclientIPaddress.LimitationsRealserviceresponsesmustberoutedthroughtheArrayTMX.EnsuresthattheArrayTMXcanseetheresponses.One-armedtopologyisnotalwayspossible.Cannotuseconnectionpoolingfeature.ArrayTMXcannotreusethesameserviceconnectionformultipleclientssinceeachclient’sIPaddressisdifferent.Reverseproxymodeispreferredforperformancebenefits.2023/8/816TransparentModeBenefits2023/8SLBRealServicesThefollowingparametersareassociatedwitharealservice:Realserviceprotocol(udp,tcp,ftp,http;tcpsandhttpsforSSL)RealservicenameRealserviceIPaddressRealserviceportHealthcheckmethodHealthcheckupHealthcheckdown2023/8/817SLBRealServicesThefollowingSLBGroupMethodsAgroupallowsrequeststobesenttoasetofsimilarservices.Example:3webservicescontainingthesamecontent.Agroupmethoddetermineswhichservicestosendrequeststo.Non-PersistentGroupMethodsEachnewclientconnectionmaybedistributedtoadifferentrealservicewithinagroup.PersistentGroupMethodsAllnewconnectionsfromaparticularclientaresenttothesamerealservicewithinagroup.Note:Realservicesthataredownwillnotbeused.RealbRealcRealaGroup2023/8/818SLBGroupMethodsAgroupallowSLBGroupMethodsNon-PersistentGroupMethodsRoundRobin(rr)LeastConnections(lc)FastestResponsetime(frt)PersistentGroupMethodsIP-BasedPersistentIP(pi)HashIP(hi)ConsistentHashIP(chi)Header/Request-BasedHashHeader(hh)PersistentHostname(ph)PersistentURL(pu)SSLSessionID(sslsid)Cookie-BasedPersistentCookie(pc)Re-writeCookie(rc)InsertCookie(ic)HashCookie(hc)Proximity2023/8/819SLBGroupMethodsNon-PersistenNon-PersistentGroupMethodsRoundRobin(rr)LeastConnections(lc)FastestResponsetime(frt)2023/8/820Non-PersistentGroupMethodsRoRoundRobin(rr)Distributesnewconnectionssequentiallybetweenavailablerealservices.Example:Connectionsaredistributedtotherealservicesinthefollowingorder:1,2,3,4,5,1,2,3The“granularity”optionmaybeconfiguredsothateachrealservicehandlesaspecificnumberofnewconnectionsbeforethenextserviceisselected.Example:Granularityvalueof“3”illustratesthedistribution:1,1,1,2,2,2,3,3,3,etc.Internet2023/8/821RoundRobin(rr)DistributesneRoundRobinClientsRouterTMXServersClientrequestsaredistributedevenly12345678InternetRoundRobin(rr)2023/8/822RoundRobinClientsRouterTMXSerLeastConnections(lc)Distributesnewconnectionstotherealservicethathastheleastnumberofcurrentconnections.Example:realservice5hasthefewestcurrentconnections,sothenextconnectionwillgotorealservice5.The“granularity”optioncanbeusedtotreatrealserviceswithinthesameconnectioncountrangeasthesame;anewrealservicewillnotbechosenuntilthisrangeisexceededforthecurrentone.Internet2023/8/823LeastConnections(lc)DistribuClientsRouterServers12InternetDistributesnewconnectionstotherealservicethathastheleastnumberofcurrentconnections.462460455465CurrentConnectionsLeastConnections(lc)2023/8/824ClientsRouterServers12InternetRealServiceWeighting(rr,lc)Weightingallowsyoutochangethedistributionbetweenrealservicesinthegroup.Example:Youmaysetoneservicetohandletwiceasmanyconnectionsasanotherservice.Useweightingifyouhaveamixofbackendserviceswithdifferentperformancecapabilities.Example:IfyouaddnewservicesthathavefasterCPUs,youcouldweightthemhighersotheyreceivemoreconnections.Internet2023/8/825RealServiceWeighting(rr,lcClientsRouterServersAdministratorsetsratiofordistributingClientrequests3:1:1:1123478910Internet561112RealServiceWeighting(rr,lc)TMX2023/8/826ClientsRouterServersAdministraClientsRouterServers12Internet10ms5ms20ms17msCurrentResponseTimesFastestResponsetime(frt)Distributesnewconnectionstotherealservicethathastheshortestresponsetime.2023/8/827ClientsRouterServers12InternetProximityThismethodisbasedonGSLBproximityinfoandusedbyredirectpolicyonly.ItselecttherealserverwhichhaslowestproximitydistancewiththerequestIP.slbgroupmethod<group_name>prox[rr|sr|lc][threshold]2023/8/828ProximityThismethodisbasedPersistentConceptthenextrequestfromsameclientshouldbeassignedtothesameserver.1231232023/8/829PersistentConceptthenextreqPersistentGroupMethodsIP-BasedPersistentIP(pi)HashIP(hi)ConsistentHashIP(chi)Header/Request-BasedHashHeader(hh)PersistentHostname(ph)PersistentURL(pu)SSLSessionID(sslsid)Cookie-BasedPersistentCookie(pc)Re-writeCookie(rc)InsertCookie(ic)HashCookie(hc)2023/8/830PersistentGroupMethodsIP-BasPersistentIP(pi)PersistentIPsendsallsuccessiveconnectionsfromaclientIPaddress(destinedtoaparticularvirtualservice)tothesamerealservice.Clientsendsarequesttothevirtualservice.ArrayhashessourceIPaddressofrequesttoselectarealservice.ArrayforwardsallrequestswiththesameIPaddresstothesamerealservice.NoteIfarealservicefails,persistencewillbemaintainedforexistingclientsonhealthyservices.TherealservicetouseforaspecificclientIPischosenwhenthefirstrequestfromthatclientIPisreceived,sothismaynotresultinthesamerealservicebeingchosenacrossdifferentArraysonfailover.2023/8/831PersistentIP(pi)PersistentIPersistentIP(pi)Scenario1ClientopensanHTTPconnectiontogetanHTMLpageClientconnectionissenttofirstrealserviceHTMLpagehaslinkstomultipleimagesinit,soclientopensadditionalHTTPconnectionstogettheimagesPersistentIPwillsendtheadditionalconnectionstothesamerealservice2023/8/832PersistentIP(pi)Scenario120PersistentIP(pi)Scenario2ClientopensHTTP(clear-text)connectiontovirtualserviceClientaddsitemstoelectronicshoppingcartWhenreadytopurchaseitems,clientopensHTTPS(encrypted)connectiontovirtualservicePersistentIPwillsendtheHTTPSconnectiontothesamerealserviceastheHTTPconnection(whereclient’sshoppingcartresides)Note:Notthebestsolutionformaintainingshoppingcartpersistence.SeeCookiePersistence(later).2023/8/833PersistentIP(pi)Scenario220thesameIPrequestshouldbeassignedtothesameserver.123123PersistentIP(pi)2023/8/834thesameIPrequestshouldbeHashIP(hi)DistributesnewconnectionstoarealservicebasedonahashofthesourceIPaddress.Clientsendsarequesttothevirtualservice.ArrayhashessourceIPaddressofrequesttoselectarealservice.Arrayforwardsallrequestswithsamehashvaluetothesamerealservice.NoteIfarealservicefails,persistencewillnotbemaintainedforexistingclientsonhealthyservices.ConsistentmappingsofclientIPtorealserviceacrossmultipleArraysduringfailoverisnotguaranteed.2023/8/835HashIP(hi)DistributesnewcoConsistentHashIP(chi)DistributesnewconnectionstoarealservicebasedonahashofthesourceIPaddress.Clientsendsarequesttothevirtualservice.ArrayhashessourceIPaddressofrequesttoselectarealservice.Arrayforwardsallrequestswithsamehashvaluetothesamerealservice.NoteIfarealservicefails,persistencewill
bemaintainedforexistingclientsonhealthyservices.MappingsofclientIPtorealserviceareconsistentacrossallArrayssothatclientswillcontinuetogotothesamerealserviceonfailover.2023/8/836ConsistentHashIP(chi)DistriHashHeader(hh)Distributesnewconnectionstoarealservicebasedonahashofanon-standardHTTPHeaderNon-standardheader=headersnotdefinedinRFC2616(HTTP/1.1)Example:X-MSISDNheadergeneratedbyWAPgatewaysAllwirelessclients(mobilephones)proxiedthroughaWAPgatewayhavethesamesourceIPaddress.Problemforclient-IPpersistencemethods!Optionsincludecookie-persistenceandHashHeadermethods.WAPgatewaycanreceiveMSISDN(phonenumber)ofuserfromRadiusandinsertitintoproxiedHTTPrequestasX-MSISDNheader.HashHeaderonthisheaderprovidesgoodloaddistributionacrosstherealserviceswhilemaintainingclientpersistence.2023/8/837HashHeader(hh)DistributesnePersistentHostname(ph)DistributesnewconnectionstoarealservicebasedonahashofthehostnamefoundintheHTTPrequest’sHostheadersentfromtheclient.ClientsendsarequesttothevirtualservicewithaHost:header.ArrayexaminesHost:headervaluetoselectarealservice.ArrayforwardsallrequestswithsameHost:headervaluetothesamerealservice.2023/8/838PersistentHostname(ph)DistriPersistentURL(pu)DistributesnewconnectionstoarealservicebasedonastaticmatchofaURLTagandValue.ClientsendsarequesttothevirtualservicewithaTagandValueincludedintheURL.ArrayhashesValuetoselectarealservice.ArrayforwardsallrequestswithsameTagandValuetothesamerealservice.2023/8/839PersistentURL(pu)DistributesSSLSessionID(sslsid)SSLSessionID(negotiatedduringSSLconnectionsetup)isusedtomaintainaclient-to-servicebinding.ClientopensanHTTPSconnectiontothevirtualservice.Arrayselectsarealserviceandforwardsrequesttoit.ResponsefromrealservicecontainsanSSLSessionID.ArraytracksSSLSIDandrealservicecombination.NextrequestfromclientcontainsSSLSID.ArrayexaminesSSLSIDandsendsrequesttothesamerealservicethatwaschosenearlier.MayonlybeusedwhenloadbalancingSSLconnections.2023/8/840SSLSessionID(sslsid)SSLSesInsertCookie(ic)ArrayautomaticallyinsertsaCookieintheserviceresponseClientsendsarequesttothevirtualservice.Arrayselectsarealserviceandforwardsrequesttoit.Responsefromrealservicedoesnotcontainacookie,butcookiepersistenceisneeded.Arraycreatesacookiebasedontherealserviceandinsertsitintheresponse.Clientreceivescookieinresponse.Nextrequestfromclientincludescookie.Arrayexaminescookie,stripsoutcookie,andsendsrequesttosamerealserviceasfirstrequest.Usedincaseswherethewebsitedoesnothavebuilt-incookiesupport.2023/8/841InsertCookie(ic)ArrayautomaClientServerHTTPrequest(nocookie)TCPhandshakeTCPhandshakeHTTPrequest(nocookie)HTTPreply(nocookie)HTTPreply(withinsertedcookie)pick
serverHTTPrequest(withsamecookie)TCPhandshakeTCPhandshakeHTTPrequest(nocookie)HTTPreply(nocookie)HTTPreply(updatedcookie)cookie
specifies
serverFirstHitSecondHitTMXInsertCookie(ic)2023/8/842ClientServerHTTPrequest(nocRewriteCookie(rc)Arrayrewrites(modifies)anamedcookie’svalueintheserviceresponse.Clientsendsarequesttothevirtualservice.Arrayselectsarealserviceandforwardsrequesttoit.Responsefromrealservicecontainsaspecificcookiewithagenericvalue.Arrayrewritescookievaluebasedontherealservice.Clientreceivescookieinresponse.Nextrequestfromclientincludescookie.Arrayexaminescookieandsendsrequesttoindicatedrealservice.Usedtosimplifycookiebasedpersistenceconfiguration.Allbackendserviceswithinagroupmustsetthesamename=valuepair.2023/8/843RewriteCookie(rc)ArrayrewriClientServerHTTPrequest(nocookie)TCPhandshakeTCPhandshakeHTTPrequest(nocookie)HTTPreply(withblankcookie)HTTPreply(withrewrittencookie)pick
serverHTTPrequest(withsamecookie)TCPhandshakeTCPhandshakeHTTPrequest(withsamecookie)HTTPreply(withblankcookie)HTTPreply(withupdatedcookie)cookie
specifies
serverFirstHitSecondHitTMXRewriteCookie(rc)2023/8/844ClientServerHTTPrequest(nocPersistentCookie(pc)Realserviceisselectedbasedonastaticmatchofthecookiename/valuepair.Clientsendsarequesttothevirtualservice.Arrayselectsarealserviceandforwardsrequesttoit.Responsefromrealservicecontainsaspecificcookiewithavaluedenotingthatservice.Clientreceivescookieinresponse.Nextrequestfromclientincludescookie.Arrayexaminescookieandsendsrequesttoproperrealservice.Eachrealservicewithinagroupmustbeconfiguredwithauniquecookievalue.2023/8/845PersistentCookie(pc)RealserClientServerHTTPrequest(nocookie)TCPhandshakeTCPhandshakeHTTPrequest(nocookie)HTTPreply(withspecialcookie)HTTPreply(withspecialcookie)pick
serverHTTPrequest(withsamecookie)TCPhandshakeTCPhandshakeHTTPrequest(withsamecookie)HTTPreply(withspecialcookie)HTTPreply(withspecialcookie)cookie
specifies
serverFirstHitSecondHitTMXPersistentCookie(pc)2023/8/846ClientServerHTTPrequest(nocHashCookie(hc)Realserviceselectionisbasedonahashofthespecifiedcookie’svalue.Usedwheneachclientbrowsersessiontothewebsiteresultsinauniquecookievalueforthatbrowsersession.2023/8/847HashCookie(hc)RealservicesClientServerHTTPrequest(nocookie)TCPhandshakeTCPhandshakeHTTPrequest(nocookie)HTTPreply(withcookie)HTTPreply(withcookie)pick
serverHTTPrequest(withsamecookie)TCPhandshakeTCPhandshakeHTTPrequest(withsamecookie)HTTPreply(withcookie)HTTPreply(withcookie)cookie
hashspecifies
serverFirstHitSecondHitThirdHitServerTCPhandshakeHTTPrequest(withsamecookie)HTTPreply(withcookie)cookie
hashspecifies
serverTCPhandshakeHTTPrequest(withsamecookie)HTTPreply(withcookie)TMXHashCookie(hc)2023/8/848ClientServerHTTPrequest(nocSLBVirtualServicesThefollowingparametersareassociatedwithavirtualservice:Virtualserviceprotocol(udp,tcp,ftp,http;tcpsandhttpsforSSL)VirtualservicenameVirtualserviceIPaddressVirtualserviceport2023/8/849SLBVirtualServicesThefollowSLBPolicySLBPolicyPolicyMatchingPolicyPrecedencePolicyTypes2023/8/850SLBPolicySLBPolicy2023/8/150SLBPolicyApolicydefinestherulesformatchingclientrequestsonavirtualservicetoaspecificgrouporrealservice.VirtualservicesmayhavemultiplepoliciesassignedtothemallowinghierarchicalL7loadbalancing.Policieshaveprecedencelevelstoresolveconflictsifaclientrequestmatchesmorethanonepolicyofthesametype.PolicyRealbRealcRealaGroupVirtualService2023/8/851SLBPolicyApolicydefinesthevirtualserver
:80Group1Groupmember(server=:80)Intelligent
TrafficControl
(lookatURL,clientIP.Cookie,HostnameHeader、regex、etc.)IncomingrequestLoadBalancingpolicyGroup2Groupmember(server=:80)Groupmember(server=:80)Groupmember(server=:80)Groupmember(server=:80)Groupmember(server=:80)SLBPolicyVirtualservicesmayhavemultiplepoliciesassignedtothemallowinghierarchicalL7loadbalancing.2023/8/852virtualserver
:80GPolicyTypesBasicPolicyTypesStaticDefaultBackupRedirectPersistentPolicyTypesPersistentURLPersistentCookieRewriteCookieInsertCookieHeaderQoSPolicyTypesQoSCookieQoSHostnameQoSURLQoSNetworkRegularExpressionHeader2023/8/853PolicyTypesBasicPolicyTypesBasicPolicyTypesBasicpolicieshandlesimpleornon-persistentclientconnections.Policytypesinclude:StaticDefaultBackup2023/8/854BasicPolicyTypesBasicpoliciStaticSendsallconnectionstoasinglerealservice.One-to-onemappingbetweenavirtualserviceandarealservice.Doesnotrequireagroupbindingordefaultpolicy.Multiplevirtualservicescanbeboundtothesamerealserviceusingstaticpolicies.virtualserver
:80Realserver:80IncomingrequestOne-to-onemappingStaticPolicyExample:2023/8/855StaticSendsallconnectionstoDefaultDefaultpolicyappliesifthereisnomatchingL7policy.Shouldalwayshaveatleastadefaultpolicy.RespondwitherrorifallrealservicesingrouparedownError503ServiceUnavailable.Canbeusedwiththefollowinggrouptypes:Roundrobin,Leastconnections,PersistentIP,Persistenthostname,Hashheader,Insertcookie,Rewritecookie,Hashcookievirtualserver
:80GroupGroupmember(server=:80)Groupmember(server=:80)Groupmember(server=:80)IncomingrequestDefaultPolicyLoadBalancingExample:2023/8/856DefaultDefaultpolicyappliesBackupBackuppolicymatchesonlyiftherewasatleastonesuccessfulmatchinapriorpolicy,butallrealservicesinallmatchedgroupsweredownorunavailable.Iftherewerenomatches,oriftherewasamatchbutthemethodfailedtoresolvedespitetherebeingrealservicesavailable,thenthebackuppolicywillnotbeused.Canbeusedwiththefollowinggrouptypes:Roundrobin,Leastconnections,PersistentIP,Persistenthostname,Hashheader,Insertcookie,Rewritecookie,Hashcookievirtualserver
:80Group1Groupmember:80IncomingrequestDefaultPolicyLoadBalancingGroup2BackupPolicyGroupmember:80Groupmember:80Groupmember:80Groupmember:80Groupmember:80IfGroup1serviceweredownorunavailable,Group2servicewillupExample:2023/8/857BackupBackuppolicymatchesonPersistentPolicyTypesAllconnectionsfromaparticularclientaresenttothesamerealservice.PersistentPolicytypesinclude:PersistentURLPersistentCookieRewriteCookieInsertCookie2023/8/858PersistentPolicyTypesAllconPersistentURLSendsclientrequestswhichmatchaspecificstringintheURLoftheformTag=Valuetoaspecificservice.VirtualservicemustbeboundtoaPersistentURL(pu)group.Defaultpolicyisrecommended.NeededincasethereisnoURLmatch.2023/8/859PersistentURLSendsclientreqPersistentCookieSendsclientrequestswhichcontainaspecificcookienametoaservicebasedonthecookievalue(issuedbyservice).OnClient’sfirstrequest,serviceissuesacookiewithavaluespecifictothatservice.Example:Realweb1:SID=service1Realweb2:SID=service2Realweb3:SID=service3ClientsendscookieandvaluewithnextrequesttoVirtual.Arraysendsrequesttoservicewithmatchingcookievalue.VirtualservicemustbeboundtoaPersistentCookie(pc)group.Defaultpolicyisrequired.Neededincasethereisnocookiematch,soitcansetone.2023/8/860PersistentCookieSendsclientRewriteCookie(rcookie)Sendsclientrequestswhichcontainaspecificcookienametoaservicebasedonthecookievalue(modifiedbyArray).Allservicesinagroupissuesamecookienameandvalue.ArrayTMrewritescookievaluetoincludeanIDfortherealservicethattheresponsecamefrom.Futureclientrequestscontainingcookiearesentbacktosameservice.VirtualservicemustbeboundtoaRewriteCookie(rc)group.Defaultpolicyisrequired.Neededincasethereisnocookiematch,soitcansetone.2023/8/861RewriteCookie(rcookie)SendsInsertCookie(icookie)Sendsclientrequestswhichcontainaspecificcookienametoaservicebasedonthecookievalue(issuedbyArray).servicesdonotusecookies.ArrayTMinsertscookienameandvaluetodenotethatrealservicethattheresponsecamefrom.Futureclientrequestscontainingcookiearesentbacktosameservice.VirtualservicemustbeboundtoanInsertCookie(ic)group.Defaultpolicypointingtothesamegroupisrequired.Neededincasethereisnocookiematch.2023/8/862InsertCookie(icookie)SendscQoSPolicyTypesAllconnectionsfromaparticularclientaresenttothesamegroupofrealservices.QoSPolicytypesinclude:QoSCookieQoSHostnameQoSURLQoSNetworkRegularExpression(Regex)Header2023/8/863QoSPolicyTypesAllconnectionQoSCookieProvidespersistencetoagroupofservicesbasedonacookienameandvaluepair.Allowsservicegroupdifferentiationbasedoncookievalue.Example:Sendclientswith“Gold”cookiestogroupwithfasterservices(payingcustomers)Sendclientswith“Silver”cookiestogroupwithslowerservices(non-payingcustomers)Itisnotrecommendedtoassociategroupsofmethodpcorhcusingthispolicybecausethiswillresultintheselectionofthesamerealserviceeachtime.virtualserver
:80Group1Groupmember:80IncomingrequestQoSCookiePolicyLoadBalancingGroup2QoSCookiePolicyGroupmember:80Groupmember:80Groupmember:80Groupmember:80Groupmember:80Cookie=GoldCookie=SilverExample:2023/8/864QoSCookieProvidespersistenceQoSHostnamePersistencetoagroupbasedonthehostnamefoundintheclientHTTPrequestHostheader.Ifyourrealservicesaresetuptoacceptrequestsformultipledomains(virtualhosting),youcansetupthismetrictomakehostnamebasedbalancingdecisions.Example:DNSresolvestheseFQDN’stosamevirtualsiteSendclientsrequesting“”and“”togroupASendclientsrequesting“”and“”togroupBvirtualserver
:80GroupAGroupmember:80IncomingrequestQoShostnamePolicyLoadBalancingGroupBQoShostnamePolicyGroupmember:80Groupmember:80Groupmember:80Groupmember:80Groupmember:80hostname=hostname=Example:2023/8/865QoSHostnamePersistencetoagQoSURLPersistencetoagroupbasedonaURLsub-st
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论