12.07.2015 Views

BROCADE IP PRIMER

BROCADE IP PRIMER

BROCADE IP PRIMER

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 16: Session Persistence and Transparent Cache Switchingual session. For example, a client goes to a website and logs in (with ausername and password) to a special area of the site. The web server verifiesthe username and password authentication, assigns a cryptic session ID andsends this ID to the client in an HTTP cookie. When the client requests furtherweb pages in this protected area of the site, the requests will contain, in theHTTP header, the cookie (with the session ID). The receiving web server will beable to verify that it's a current session that was properly authenticated.This works if your client is connecting to the same individual web server eachtime, but what if your web servers are being load balanced? Well, you've got acouple of options:Cookie SwitchingWith cookie switching, you can configure a value (an ID) to each individual participatingreal server in your ServerIron's configuration. Then you wouldconfigure your individual web servers to hand their clients a cookie containingthe ID (assigned to the particular server). When a client makes an initial connection,the ServerIron load balances it according to the predictor. The serverthat it hands off to gives the client a cookie that contains the real server's ID.The next packets from the client contain this cookie. The ServerIron looks atthe cookie of the incoming packet, and directs the connection to the realserver belonging to that cookie.To configure cookie switching, you need to configure IDs on the real servers:SLB-ServerIron#conf tSLB-ServerIron(config)#server real rs1SLB-ServerIron(config-rs-rs1)#port http server-id 2001SLB-ServerIron(config-rs-rs1)#server real rs2SLB-ServerIron(config-rs-rs2)#port http server-id 2002Notice that the ID is tied to the real server port. It is certainly possible to assignmultiple IDs to the same real server (say, a unique ID for each port?). The“server-id” can be any number between 1024 and 2047. The important thingis to make the numbers unique to each real server. The use of higher numberswithin this group is recommended. For instance, I chose to start at 2000 andcorrespond the ID numbers with the real server's name (e.g., rs1 - 2001, rs2 -2002, etc.).To enable cookie switching on your virtual server, you must first create a ruleand a policy:SLB-ServerIron#conf tSLB-ServerIron(config)#csw-rule rule1 header "Cookie" search"ServerID="SLB-ServerIron(config)#csw-policy policy1SLB-ServerIron(config-csw-policy1)#match rule1 persist offset0 length 0 group-or-server-idSLB-ServerIron(config-csw-policy1)#default forward 1SLB-ServerIron(config-csw-policy1)#default rewrite insertcookie"ServerID" "*" "*" age 60360 Brocade <strong>IP</strong> Primer

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!