[Plugin: WP Super Cache] Super Cache with Geo-Targeting
-
I am looking into using WP Super Cache to cut down on traffic to my database hosts and improve render times on my origin hosts. My setup is a bit of a fringe case, so I’m not sure if the plugin will be able to accommodate my needs without some heavy customization. My setup overview is:
-Akamai Global CDN (which provides geo-locale data to my origin hosts via http headers)
-Dual Zeus Load Balancers (running as origin-web & routing to application & media hosts)
-Four WP Application hosts running NGINX & php-fastcgi (which parse country code into $_SERVER[country] variable)
-Two co-mastered DB servers
-Two media hosts serving all static files (js/jpgs/video/etc)Just “out of the box” the plugin does an incredible job of speeding up render times on my origin servers and cutting down traffic to my database hosts using PHP to serve cache files. The biggest hurdle I am going to have is that I am rendering content server-side specific to an end users geo-location. With regards to my CDN & to cope with the same page having different content based upon an end-users locale I have implemented a custom metadata setup with my CDN that creates unique cache-keys based upon location requirements (so instead of all requests going to origin-web.server.com they get routed as origin-web-us/origin-web-ca/origin-web-uk/etc.)
SOOO, you can probably (hopefully) see how I’m at a bit of a wall on how to implement caching in my application hosts without having users from different locale’s seeing the same page. For example:
-Joe, who is in the US, requests https://www.mysite.com, which gets cached
-Mary, who is in Canada, requests https://www.mysite.com and Super Cache wants to serve her the file that was cached on Joe’s request, so Mary ends up seeing US based contentThe obvious answer would be to append regions to the URL to make them unique, but for SEO reasons I can’t have the same piece of content living at 5 or 6 different URL locations.
Anybody have any bright ideas out there? Hopefully someone else has been through a similar scenario and found a solution… If I can tweak Super Cache to use $_SERVER[country] as part of it’s logic while generating the long string in the static page names ( /wp-content/cache/wp-cache-#######.html ) that should be sufficient, but I am daunted by the task of reverse-engineering this solution. :-p
- The topic ‘[Plugin: WP Super Cache] Super Cache with Geo-Targeting’ is closed to new replies.