Sticky question

Unanswered Question
Apr 9th, 2010
User Badges:

Hi All .. more questions ?


We have a web app that requires sticky sessions. We have to use IP as the marker.

The IP source has comes from a one-2-one NAT range that has a /16 mask.

The sticky config is currently

:

sticky ip-netmask 255.255.255.255 address source WEB_APP_GP
  replicate sticky
  serverfarm SERV_FARM

this seems to work so far,

Question: should this actually be


sticky ip-netmask 255.255.0.0 address source WEB_APP_GP
  replicate sticky
  serverfarm SERV_FARM


thanks again for help

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
ciscocsoc Fri, 04/09/2010 - 00:52
User Badges:
  • Silver, 250 points or more

Hi,


The netmask is used to determine how much of the source address is used to create an entry in the database - i.e. the network component rather than the host component is used.  If you use a /16 mask then the first client to connect will create a sticky database entry and all subsequent clients from your NATTed range will match that entry and be load-balanced to the same server. This is probably not what you want.


I tend to use a /32 mask to balance each client individually but if your clients are evenly distributed across the /16 you could use a /24 mask and create fewer sticky entries in the database.


HTH


Cathy

Actions

This Discussion