Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000179 [Resin] minor always 05-17-05 00:00 11-30-05 14:43
Reporter ferg View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 3.0.13
Summary 0000179: session cookie generation must allow for strict index
Description RSN-179
(rep by Anupam Bagchi)

Allow the session id generation to be strict, e.g. index='1' always produces aXXXXXXXX
Additional Information
Attached Files

- Relationships

- Notes
(0000205)
ferg
05-17-05 00:00

server/01ig, server/01ih
 
(0000206)
sam
05-17-05 00:00

The configuration is <cookie-modulo-cluster>, it defaults to "true".
For "strict" assignment (as described in the bug report), it is set to false:

<session-config use-persistent-store="true">
  <cookie-modulo-cluster>false</cookie-modulo-cluster>
</session-config>

Typically, this should be left alone, and the default behaviour (described below) should be used.

When assigning a new session id, Resin encodes the cluster index of the server
in the first character. It does this so that on subsequent requests, the
request can be routed to the server that "owns" the session (sticky sessions).
The assignment is based on the index of the server in the cluster, and the number of servers in the cluster.

The default behaviour is to use modulus to assign any of a number of
letters as the encoded character.
 
For example, with 3 servers:

server 1 "a" or "d" or "g" or "j" or ...
server 2 "b" or "e" or "h" or "k" or ...
server 3 "c" or "f" or "i" or "l" or ...

Server 1 assigns "a" or "d" or "g" so that if a new server is added to the cluster, the existing sessions are immediately balanced across the new configuration:

server 1 "a" or "e" or "i" or ...
server 2 "b" or "f" or "j" or ...
server 3 "c" or "g" or "k" or ...
server 4 "d" or "h" or "l" or ...
 

- Issue History
Date Modified Username Field Change
05-17-05 00:00 ferg New Issue
11-30-05 00:00 administrator Fixed in Version  => 3.0.14
11-30-05 14:43 ferg Status resolved => closed


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker