You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rich Schumacher <ri...@gmail.com> on 2008/06/23 20:35:22 UTC

[users@httpd] Cookie based AB testing with different document roots

 Hey all,

Here is my dilemma:  I have several web servers that each contain two
versions of our site (skin is different, URLs are the same) located in
different document roots, /var/www/a.example.com and /var/www/b.example.com.
The marketing department wants to compare the versions to see which is more
effective for a number of metrics.  I need to direct 90% of traffic to the
"a" doc root and 10% to the "b" doc root.  This needs to be done via
long-expire cookies since I want users to get the same version of the site
they were originally served.  So, essentially, I need the Apache balancer to
load balance requests to the web servers as well as drop a version cookie if
it does not already exist.  If the Apache balancer encounters a version
cookie that was previously set, it should just direct traffic normally.
Then the request is passed from the balancer to the webserver and I can
rewrite the document root with mod_rewrite based on the cookie set by the
balancer.

Is this possible using mod_proxy_balancer, or am I on the wrong path.  Maybe
there is an easier way to do this?

I've tried searching this list, reading the docs, and Googling but I can't
seem to find anything that will satisfy these requirements.  I know that
this would be much easier to just have separate boxes for each version of
the site; trust me, I've tried suggesting that, but this is currently not an
option.

Thanks in advance,

Rich Schumacher