I recently began using mod_backhand on a site that I run, livejournal.com.
We just bought some new webservers and needed to load balance
them. mod_backhand was a wonderful solution.
One problem I've encountered though is that users on the site are not
always able to login anymore reliably. Their cookies are being lost, or
only one of several are being set. (why we need more than one is another
story...)
After tons of tinkering and packet sniffing, I think I've figured out the
problem.
HTTP request comes in to server A, gets proxied to machines B or C, B or C
answers, with multiple Set-Cookie HTTP response headers, mod_backhand only
preserves the last one (is Apache's table interface a 'bag' or 'set' ?),
and thus the user's client only sends back one cookie later.
I saw the comment and code in mod_backhand that talks about the potential
problem with multiple Cookie: lines coming in on a request if the user
agent doesn't clump them all on one line, but I think this is a separate
problem.
Once the users get a login on the site, it doesn't matter what server they
hit from then on.... they always retain all their cookies.
Can anybody familiar with the mod_backhand code confirm this problem and
ideally fix it? Or am I left to go learn the Apache table APIs? :)
Thanks,
Brad
We just bought some new webservers and needed to load balance
them. mod_backhand was a wonderful solution.
One problem I've encountered though is that users on the site are not
always able to login anymore reliably. Their cookies are being lost, or
only one of several are being set. (why we need more than one is another
story...)
After tons of tinkering and packet sniffing, I think I've figured out the
problem.
HTTP request comes in to server A, gets proxied to machines B or C, B or C
answers, with multiple Set-Cookie HTTP response headers, mod_backhand only
preserves the last one (is Apache's table interface a 'bag' or 'set' ?),
and thus the user's client only sends back one cookie later.
I saw the comment and code in mod_backhand that talks about the potential
problem with multiple Cookie: lines coming in on a request if the user
agent doesn't clump them all on one line, but I think this is a separate
problem.
Once the users get a login on the site, it doesn't matter what server they
hit from then on.... they always retain all their cookies.
Can anybody familiar with the mod_backhand code confirm this problem and
ideally fix it? Or am I left to go learn the Apache table APIs? :)
Thanks,
Brad