Example 2: parsing the cookie, Example 3: using passive cookie mode – Nortel Networks WEB OS 212777 User Manual

Page 434

Advertising
background image

Web OS 10.0 Application Guide

434

n

Chapter 16: Persistence

212777-A, February 2002

Example 2: Parsing the Cookie

This example shows three configurations where the switch uses the hashing key or wild cards
to determine which part of the cookie value should be used for determining the real server. For
example, the value of the cookie is defined as follows:

Cookie: sid=0123456789abcdef; name1=value1;

...

n

Select the entire value of the

sid

cookie as a hashing key for selecting the real server:

This command directs the switch to use the

sid

cookie, starting with the first byte in the

value and using the full 16 bytes.

n

Select a specific portion of the

sid

cookie as a hashing key for selecting the real server:

This command directs the switch to use the sid cookie, starting with the eight byte in the
value and using only four bytes. This uses

789a

as a hashing key.

n

Using wildcards for selecting cookie names:

With this configuration, the switch will look for a cookie name that starts with

ASPSES-

SIONID

.

ASPSESSIONID123

,

ASPSESSIONID456

, and

ASPSESSIONID789

will

all be seen by the switch as the same cookie name. If more than one cookie matches, only
the first one will be used.

Example 3: Using Passive Cookie Mode

If you are using passive cookie mode, the Web switch examines the server’s

Set-Cookie:

value and directs all subsequent connections to the server that assigned the cookie.

For example, if Server 1 sets the cookie as “

Set-Cookie:

sid=12345678

,” then all traf-

fic from a particular client with cookie

sid=12345678

will be directed to Server 1.

The following command is used on the Web switch:

>> # /cfg/slb/virt 1/service 80/pbind cookie passive sid 1 16 dis

>> # /cfg/slb/virt 1/service 80/pbind cookie passive sid 8 4 dis

>> #

/cfg/slb/virt 1/service 80/pbind cookie passive

ASPSESSIONID* 1 16 dis

>> # /cfg/slb/virt 1/service 80/pbind cookie passive sid 1 8 dis

Advertising