We have multiple websites each with multiple variations to split test. Each variation can also have multiple phone numbers so there is a mix of a lot of static content with just a few dynamic parts. Currently we are running apache and PHP to generate the *entire* page with these dynamic parts and find the response time really slow and it's not very scalable (we are now over 10 load balanced web servers).
When a user comes to the site without a session we create a new session and store a variation and phone number (based on many things like UserAgent,referrer, geo-location, etc); this is the dynamic content they will be displayed. The combination of variation and phone number are essentially unique to each unique visitor.
I was looking at varnish or other reverse proxy/caching solutions but I wanted to ask you guys first to see if anyone has a creative solution to this issue. Ideally the session generation would run a script to figure out variation + phone number and then _______ ? Not sure :)
Example Session Data
sid=hash
variation=1002
phoneNumber=800-800-8000
Would be awesome to somehow (without php) to rewrite both the URL and HTML content based on the content of the session.
Rewrite: /index.html -> /variations/1002/index.html
HTML Replace: <span class="phone">$phone</span> -> <span class="phone">800-800-80000</span>
Any help or insights would be much appreciated!!
B