Hi Robert,

 

After using poundctl to see the internal of pound, I think I get the answer to 
my original question.

 

Here is my experiment.

This setup has 2 backends.

I first get to the signon page of the application.

I have 2 browser windows open and made sure that each one is connected to a 
different backend.

 

Now, I restarted pound while the 2 browser windows are still open.

When I refresh the page in the browser windows, the requests going to pound 
already carry the session values. 

poundctl at this point shows both sessions are pointing to backend #1.

 

This indicates when pound receives a request with the session value BUT pound 
does not already have a mapping of the value to a backend, pound right away 
maps the session value to a backend.

 

This is just an observation.

I am not sure if this is the right or wrong implementation.

 

Does it make sense to map the session value to a backend on its way back from 
the backend to pound?

 

Thanks.

 

  0. http Listener 53.67.28.38:81 a
    0. Service active (10)
      0. Backend 53.67.26.243:80 active (5 0.000 sec) alive
      1. Backend 53.67.9.81:80 active (5 0.000 sec) alive
      0. Session 53%2E67%2E9%2E81 -> 1
      1. Session 53%2E67%2E26%2E243 -> 1



 
> From: [email protected]
> To: [email protected]
> Date: Wed, 28 Oct 2009 12:47:10 -0400
> Subject: RE: [Pound Mailing List] how does session cookie work...
> 
> 
> Thanks for the poundctl pointer.
> 
> The application is classic ASP.
> 
> I tried using the ASP session cookie before and it did not work because the 
> value of the cookie keeps changing and this is why I injected my own cookie 
> with the IP address as the value.
> 
> 
> 
> It works fine in the sense that it achieves session affinity but I am not 
> seeing close to evenly distributed balancing.
> 
> > Date: Tue, 27 Oct 2009 16:09:22 -0400
> > From: [email protected]
> > To: [email protected]
> > Subject: RE: [Pound Mailing List] how does session cookie work...
> > 
> > If this is developed in .net, you can use the aspnetsessionid like in
> > the following thread:
> > 
> > http://www.apsis.ch/pound/pound_list/archive/2007/2007-07/1184948236000/
> > index_html?fullMode=1185006949000
> > 
> > I'd assume other languages have a similar feature.
> > 
> > I think poundctl will show you the mapping of sessions to backends.
> > 
> > --Alfonso
> > 
> > 
> > -----Original Message-----
> > From: Patrick Ma [mailto:[email protected]] 
> > Sent: Tuesday, October 27, 2009 3:00 PM
> > To: Pound Mailing List
> > Subject: [Pound Mailing List] how does session cookie work...
> > 
> > 
> > Hi,
> > 
> > 
> > 
> > I have defined 1 service with 3 backends.
> > 
> > Session is tracked by cookie.
> > 
> > 
> > 
> > At login time of the backend, each backend sets a cookie with a value of
> > its IP address.
> > 
> > 
> > 
> > My question is WHEN does Pound set its mapping of cookie value and
> > backend server.
> > 
> > 
> > 
> > Is this correct?
> > 
> > client login request (no cookie yet) --> pound (round robin because
> > of no cookie) --> backend
> > 
> > backend (set cookie) --> pound (see cookie and map cookie value to
> > backend) --> client
> > 
> > 
> > 
> > What if I just restarted pound and the cookie value and backend mapping
> > is gone.
> > 
> > 
> > 
> > client request (with cookie) --> pound (see cookie but no mapping. so
> > round robin. now does pound map the cookie value to the backend it is
> > going to?) If so, the cookie value is not necessary the backend's IP
> > address.
> > 
> > 
> > 
> > I am asking this because I am see the cookie value in the HTTP header
> > but pound is not sending the request to the backend I am expecting based
> > on the IP address.
> > 
> > 
> > 
> > Thanks.
> > 
> > 
> > 
> > Patrick Ma
> > 
> > _________________________________________________________________
> > Windows 7: It helps you do more. Explore Windows 7.
> > http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=D24727::T
> > :WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen3:102009
> > 
> > --
> > To unsubscribe send an email with subject unsubscribe to [email protected].
> > Please contact [email protected] for questions.
> > 
> > --
> > This message has been scanned for viruses and dangerous content by
> > SecureMail, and is believed to be clean.
> > 
> > 
> > 
> > --
> > To unsubscribe send an email with subject unsubscribe to [email protected].
> > Please contact [email protected] for questions.
> 
> _________________________________________________________________
> Windows 7: It helps you do more. Explore Windows 7.
> http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen3:102009
> 
> --
> To unsubscribe send an email with subject unsubscribe to [email protected].
> Please contact [email protected] for questions.
                                          
_________________________________________________________________
Windows 7: It helps you do more. Explore Windows 7.
http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen3:102009

--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.

Reply via email to