¡m¤À¨É¡nServer Load Balance | |
AarryªºServer Load Balance(SLB)¬[ºc¬O±NAPV°µ¬°¹ï¥~ªºµêÀÀ¦øªA¾¹¡A
·í¥~³¡²£¥Í»Ý¨D³s¦VAPV®É¡A¦A¥ÑAPV¨Ì·Ópolicyªº»Ý¨D¡A¤À¬£µ¹¤º³¡¯u¹ê¦øªA¾¹¡C
´N©Ý¾ë¬[ºc¨Ó»¡¡AAPVÀ³¸Ó§G¸p¦b¨¾¤õÀ𤺡A»P¯u¹ê¦øªA¾¹¥¦æ³s±µ¡A
¤£»ÝÂ\¦b¨¾¤õÀð¥~¡Aª½±µ±¹ï¥~¬É¦UºØ§ðÀ»¡C
·í¦³¬y¶q²£¥Í®É¡A§¡¥ÑAPV¨Ó©Ó±µ¡A¦Apolicy¤§¤£¦P¡A±N³s½u¾É¦V¯u¹ê¦øªA¾¹¡C
¦]¦¹AVPªº¹ê»Ú¬y¶q·|¬O«á±¯u¹ê¦øªA¾¹ªºÁ`¦X¡C
©Ò¥H´NAVPªºµwÅé®Ä¯à»Ý¨D¨Ó»¡¡A¨ä©Ó¸üªº³s½usession¼Æ»Pthroughput¡A¤@©wn»·¤j©ó«áºÝªº¯u¹ê¦øªA¾¹¡I
¨Ì¬[ºc¨Ó¬Ý¡A¨äSLB¦@¤À¬°4¼hÃö«Y¡A¤À§O¬OReal¡AGroup¡AVirtual»PPolicy¡C
Real ´N¬O«áºÝªº¯u¹ê¦øªA¾¹¡A¦@¦³¼Æ¥x¨Ó´£¨Ñ¹ï¥~ªA°È¡C
Group §â«áºÝ¯u¹ê¦øªA¾¹²Õ¦¨¤@Ó¸s²Õ¡A¥u¦³¬Û¦PªA°ÈÃþªºReal¤~¯à©ñ¦b¤@²Õ¡C
Virtual µêÀÀ¦øªA¾¹¡A¤]´N¬OAVP¡C
Policy «h¨M©w¤Fn¥H¦óºØÅÞ¿è¤è¦¡¨Ó¤À°t¬y¶q¡C
¹ê»Ú«Ø¸m®É¡A¤]·|¨Ì·Ó³o4¼hÃö«Y¤§¥ý«á¶¶§Ç¨Ó³]©w¡C
¥H¤U¬°WebUIªº¥Ü½dÀô¹Ò¡A§Ú̳z¹LWebUI¨Ó³]©w¤@²ÕSLB¹ïÀ³Ãö«Y
Real ¦@¦³r_web01~04µ¥4¥x¡AIP¤À§O¬°10.10.1.105~108
Group ¬°g_web
Virtual ¬°V_web¡AIP¬°10.10.1.200
Policy ¬°default
³]©wReal Server
¦bSERVER LOAD BALANCE / Real Services / Real Services ¤¤³z¹L ADD ¨Ó·s¼WReal Service¡C
·s¼WReal services®Énª`·NService Type»PPortªº³]©w¡C
¦P¤@¸s²ÕªºReal Services³]©wn¬Û¦P¡A¥BVirtual ServiceªºService Type»PPort¤]n©MReal Serveice¤@P¡A
³o¼Ë¤º¥~¤~·|¹ïªº°_¨Ó¡C
¥BHTTP 80 port»PTCP 80 port·N¸q¤£¦P¡A³]©w®É½Ð°È¥²½T»{¥Î³~¡C
¦bHealth Check Typeªº³¡¤À¡A«h¬O³]©w¥Î¦óºØ¤è¦¡¨Ó½T»{¸ÓReal ServiceªºªA°Èª¬ºA¡C
Y¸gcheck¬°downªºª¬ºA¡A«hVirtual Service¦b¤À¬£®É¡A´N·|±Ë±ó³oÓReal Service¡A¥Hºû«ùªA°È¤§«ùÄò©Ê¡C
¦Ó¦bSERVER LOAD BALANCE / Health Check Setting¶ÅÒ¡A«h¬O¥Î¨Ó³]©wGlobalªºhealth check°Ñ¼Æ¡C
§ÚÌ¥i¥H¦b³o½Õ¾ã°»´úªº®É¶¡¤ÎÀW¦¸...µ¥²Ó¶µ³]©w¡C
³]©wGroup»PMethod
¦bSERVER LOAD BALANCE / Groups / Groups¤¤¡A³z¹L ADD ¨Ó·s¼W¤@ÓGroup¡C
·s¼WGroup®É¡A°£¤F¸s²Õ¦WºÙ¡A¤]n¨M©w¦n¸s²Õ¦¨û¶¡ªº¤À¬£¤è¦¡¡C
·s¼W¦nGroup«á¡A³sÂI·Æ¹«¨â¤U¸ÓGroup¡A¨ÓÀ˵ø¸s²Õ¦¨û¡C
¦bÀ˵ø¸s²Õ¦¨û¤¤¡A¥i«ö¤U ADD ¨Ó·s¼W¸s²Õ¦¨û¡C
¿ï¾Ü¥i¥Îªº¸s²Õ¦¨û¤Î¤ñ««á¡A«ö¤U SAVE §Y¥i§â¸ÓReal Service¥[¤J¸s²Õ¤§¤¤¡C
¦ÓGroupªºmethod¥Dn¤À¬° Persistent »P Non-Persistent ¨â¤jÃþ§O¡C
Y¥Î¤áºÝ¦³«ùÄò³s¦V¦P¤@¥xreal serviceªº»Ý¨D®É¡A¨Ò¦pÁʪ«¨®¡B·|û¨t²Î¡A½Ð¿ï¥Î¾A¦Xªº Persistent ¤èªk¡F
YµL«ùÄò©Ê¤§»Ý¨D¡A¥i¿ï¥Î Non-Persistent ¤èªk¡A§ó¦³®Ä²vªº¤À´²¬y¶q¡C
³]©wVirtual»PPolicy
¦bVirtual³¡¤À¡A¥i³z¹LSERVER LOAD BALANCE / Virtual Services / Virtual Services¨Ó·s¼W¤@ÓVirtual¡C
·s¼W§¹¡A³sÂI·Æ¹«¨â¤U¸ÓVirtual¨Ó³]©w¹ïÀ³¤§Group»PPolicy¡C
¿ï¦nGroup¤ÎPolicy«á¡A«ö¤U ADD §Y«Ø¥ß¦nSLB¤F¡ã
SLBªºPolicy¥Dn¤À¬°¥|Ãþ¡ABasic¡BRedirect¡BQoS Policy Type»PPersistent Policy Type¡C
Basic ùئ³¤TºØ±`¥ÎªºPolicy¡AStatic¡BDefault»PBackup¡C
Default¬O³Ì°ò¥»ªºPolicy¡A¥i¥Î©ó¦h¼ÆªºGroup Method¡C
¦ÓBackup«h»Ý¨Ìªþ¦bDefault¤§¤U¡A¤£¯à³æ¿W¦s¦b¡F¦bDefault Policy failed¤§«á¡ABackup Policy´N·|±µ¤â¹B§@¡C
Static«h¬OÀRºAPolicy¡A¥H¹w³]¤§Àu¥ýÅv¨Ó»¡¡A¥u§C©óRedirect Policy¡F
·í³]©w¤FStatic Policy«á¡A°£«D¦³Redirect Policy¡A§_«h·|ª½±µ¥HStatic Policy¨Ó¶i¦æ¡C
¦UºØPolicyªºÀu¥ý¶¶§Ç¦p¤U¹Ï
·íµMPolicyªºpriority¤]¥i¨Ì¹ê»Ú»Ý¨D¨Ó¶i¦æקï¡C
Monitoring
§ÚÌ¥i¥H¦bSERVER LOAD BALANCE / Monioring / Status¤¤À˵øVirtual¡BGroup»PRealªº¹ïÀ³Ãö«Y¡A»P°·±dª¬ºA¡C
·í4¥xReal³£¬O¥¿±`ªA°È®É¡A§Ú̳z¹Lºô¶¿é¤JVirtualªºIP 10.10.1.200¡A
¥¦´N¨ÌGroup¤¤ªºMethod¡A±N¬y¶q¤À°t¨ì¹ê»Úªº«áºÝ¥D¾÷¡A¨Ò¦p10.10.1.105¡C
·ír_web01 10.10.1.105¦º±¼®É¡A¥¦´N·|²¤¹L¥¦¡A¦Ó±N¬y¶q¾É¨ì¤U¤@ÓGroup Method©Ò¤À°tªº¥D¾÷¡C
X-Forwarded-For
¥Ñ©ó¬y¶q¬O¥ý¨ìVirtual¡AµM«á¦A¥ÑVirtual¾É¦VReal¡A
©Ò¥H¦bReal¤W¡A¬Ý¨ìªº³s¤JIP·|¬OVirtualªºIP 10.10.1.104¡A¦Ó¤£¬O¹ê»Ú³X«Èªº¯u¹êIP 192.168.1.2¡C
¦³¨S¦³¤°»ò¤è¦¡¥i¥H¬Ý¨ì³X«Èªº¯u¥¿IP©O¡H
¦³ªº¡A¥´¶}X-Forwarded-For´N¥i¥H¥ÑVirtual§â³X«Èªº¯u¹êIP¶Çµ¹Real¤F¡ã
♥¶¶¤l¦Ñ±Cªººô©ç¡A½Ð¦hÃö·Ó¡ã
If you don't like something, change it.
If you can't change it, change your attitude.
Don't complain!
|