负载均衡开源解决方案.ppt_第1页
负载均衡开源解决方案.ppt_第2页
负载均衡开源解决方案.ppt_第3页
负载均衡开源解决方案.ppt_第4页
负载均衡开源解决方案.ppt_第5页
免费预览已结束,剩余24页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Layer4 7 Layer4 7Switch Schedule BasicallyHardware GUI CLI Configuremethod HA ConfigSync Loadbalancerelatedvirtualserver node pool poolmemberMonitorsSorryserverMaintenanceModeLoadbalancemethodPersistenceSNAT RNATServerProtectionACL ContentSwitchGSLBPerformance Wearehere Basically LBrelated Persistence SNAT RNAT ServerProtection ACL CS GSLB Hardware GUI CLI HA HAProxyHotReconfiguration mv etc haproxy config etc haproxy config oldmv var run haproxy pid var run haproxy pid oldmv etc haproxy config new etc haproxy configkill TTOU cat var run haproxy pid old ifhaproxy p var run haproxy pid f etc haproxy config thenecho Newinstancesuccessfullyloaded stoppingpreviousone kill USR1 cat var run haproxy pid old rm f var run haproxy pid oldexit1elseecho Newinstancefailedtostart resumingpreviousone kill TTIN cat var run haproxy pid old rm f var run haproxy pidmv var run haproxy pid old var run haproxy pidmv etc haproxy config etc haproxy config newmv etc haproxy config old etc haproxy configexit0fi 保存之前状态 停止老的监听 成功 清理老的连接和pid 失败 恢复老的配置 Wearehere Basically LBrelated Persistence SNAT RNAT ServerProtection ACL CS GSLB Concepts virtualserver192 168 101 1 80 pool name cgi boxes member server 10 1 1 3 80 member server 10 1 1 2 80 member server 10 1 1 1 80 pool name asp boxes member server 10 1 1 6 80 member server 10 1 1 5 80 member server 10 1 1 4 80 VIP192 168 101 1 virtualserver192 168 101 1 443 pool name ssl boxes member server 10 1 1 6 443 member server 10 1 1 2 443 member server 10 1 1 1 443 VIP192 168 101 2 LoadBalancing IntelligentTrafficControl lookatURL clientIPaddr etc Port basedTrafficDirection IPAddr basedTrafficDirection Incomingrequest MonitorAvailabilityrequirementSNAT NATPriority basedmemberactivationACTIONofservicedownSlowRampTimePool poolmemberstatistics Monitors Monitor类型 自定义monitor HAProxyMonitor listenwebfarm192 168 1 1 80modehttpbalanceroundrobincookieSERVERIDinsertindirectoptionhttpchkHEAD index htmlHTTP 1 0serverwebA192 168 1 11 80cookieAcheckserverwebB192 168 1 12 80cookieBcheckport81inter2000serverwebC192 168 1 13 80cookieCcheckserverwebD192 168 1 14 80cookieDcheck HAProxySorryServer listenwebfarm192 168 1 1 80modehttpbalanceroundrobincookieSERVERIDinsertindirectoptionhttpchkHEAD index htmlHTTP 1 0serverwebA192 168 1 11 80cookieAcheckserverwebB192 168 1 12 80cookieBcheckport81inter2000serverwebC192 168 1 13 80cookieCcheckserverwebD192 168 1 14 80cookieDcheckserverbkpA192 168 1 15 80cookieAcheckbackupserverbkpB192 168 1 16 80cookieBcheckbackup HAProxyMaintenanceMode Updating 503ServiceUnavailableNoserverisavailabletohandlethisrequest Loadbalancingalgorithm RoundRobinWrr Ratio member Ratio Node DynamicRatio 根据对服务器性能的观察来动态设置weight 观察点包括连接数 响应时间等 Fastest node Fastest application 服务器 应用的最快响应时间LC Member LC node Observed member Observed node Predictive member Predictive node SourceURLHASHURLParam Wearehere Basically LBrelated Persistence SNAT RNAT ServerProtection ACL CS GSLB Persistence Client ServerA pickserver cookiespecifiesserver Set Cookie SERVERID A Cookie SERVERID A Cookiepersistence1 1HTTPCookieInsert1 2HTTPCookieRewrite1 3HTTPCookiePassive1 4CookieHashDestinationAddressaffinitypersistenceHashpersistenceMSRDPpersistenceSIPpersistence sessionInitiationprotocol SouceaddressaffnitypersistenceSSLpersistenceUniversalpersistence insertrewriteprefix listenwebfarm192 168 1 1 80modehttpbalanceroundrobincookieSERVERIDinsertindirectoptionhttpchkHEAD index htmlHTTP 1 0serverwebA192 168 1 11 80cookieAcheckserverwebB192 168 1 12 80cookieBcheckserverwebC192 168 1 13 80cookieCcheckserverwebD192 168 1 14 80cookieDcheck SNAT RNAT Externalvlan Internalvlan VIP 221 238 249 177 MAPPEDIP 10 10 1 1 eth0 10 10 1 2 eth1 192 168 1 2 SNAT RNAT backendprivate Connecttotheserversusingour192 168 1 200sourceaddresssource192 168 1 200backendtransparent ssl1 ConnecttotheSSLfarmfromtheclient ssourceaddresssource192 168 1 200usesrcclientipserverrailsA192 168 1 11 80source192 168 1 201checkserverrailsB192 168 1 12 80minconn4maxconn12checkserverrailsC192 168 1 13 80minconn4maxconn12check Wearehere Basically LBrelated Persistence SNAT RNAT ServerProtection ACL CS GSLB ServerProtection Attack SYNFlood ConnectionLimitTimeoutSurgeQueueSlowStart listenappfarm192 168 1 1 80modehttpmaxconn10000optionhttpcloseoptionabortoncloseoptionforwardforbalanceroundrobinserverrailsA192 168 1 11 80minconn4maxconn12checkserverrailsB192 168 1 12 80minconn4maxconn12checkserverrailsC192 168 1 13 80minconn4maxconn12checkcontimeout60000 weight maxconn Timeout Client proxy server Wearehere Basically LBrelated Persistence SNAT RNAT ServerProtection ACL CS GSLB HAProxyACL req lenwait endreq ssl ver Layer4andbelow Layer4Content methodreq verpath url hdr Layer7Content HTTP 1 1METH GET Pre definedACL src dstsrc port dst portdst connnbsrv backend aclmissing clhdr cnt Content length eq0blockifHTTP URL STAR METH OPTIONS METH POSTmissing clblockifMETH GETHTTP CONTENTblockunlessMETH GETorMETH POSTorMETH OPTIONS Toselectadifferentbackendforrequeststostaticcontentsonthe www siteandtoeveryrequestonthe img video download and ftp hosts aclurl staticpath beg static images img cssaclurl staticpath end gif png jpg css jsaclhost wwwhdr beg host iwwwaclhost statichdr beg host iimg video download ftp nowusebackend static forallstatic onlyhosts andforstaticurls ofhost www Usebackend www fortherest use backendstaticifhost staticorhost wwwurl staticuse backendwwwifhost www ContentSwitch UIE iRule ACL frontendpublicreqisetbe Host imgstatic TheURIwilluseaspecifickeywordsoonreqisetbe img css staticreqisetbe admin statsstatsdefault backenddynamic Thestaticbackendbackendfor Host img imgand css backendstatic backenddynamic backendstats if http uriends with gif usepoolimage servers elseif http uristarts with foo usepoolfoo servers elseif http cookie XYZ Type direct usepoolcookie servers elseif findstr http uri type 6 cgi usepoolcgi servers else usepoolweb servers aclurl staticpath beg static images img cssaclurl staticpath end gif png jpg css jsaclhost wwwhdr beg host iwwwaclhost statichdr beg host iimg video download ftp use backendstaticifhost staticorhost wwwurl staticuse backendwwwifhost www Wearehere Basically LBrelated Persistence SNAT RNAT ServerProtection ACL CS GSLB GSLB 如何实现CDN和站点容灾 Illustrated Performance Keep AliveCompressionIn memoryCacheServerOffloadTCPBuffering Logging listenproxy outmodehttpoptionhttplogoptionlogasaplogglobalservercache1192 168 1 1 3128 logthenameofthevirtualservercapturerequestheaderHostlen20 logtheamountofdatauploadedduringaPOSTcapturerequestheaderContent Lengthlen10 logthebeginningofthereferrercapturerequestheaderRefererlen20 servername usefulforoutgoingproxiesonly captureresponseheaderServerlen20 loggingthecontent lengthisusefulwith optionlogasap captureresponseheaderContent Lengthlen10 logtheexpectedcachebehaviourontheresponsecaptureresponseheaderCache Controllen8 HTTPHeaderManipulation reqdelreqdenyreqpassreqtarpitreqsetbereqisetbereqirepreqidelreqidenyreqipassreqiallowreqitarpitreqaddrsp removeX

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论