Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Could use some advice here.

We have a fairly high traffic site web site using WordPress. Currently we have two VPS servers managing the site, one that holds WP, one that holds MySQL. The WP servers uses W3 Total Cache with Disk Enhanced to avoid PHP processing.

The site has a history of using "Splash Pages" on big news stories. This is how these work.

Caching is turned off for the home page. A cookie is provided to users. New visitors are directed using a Header relocation command to a separate, cached page with the splash content. Return visitors are directed using a Header relocation command to a separate, cached home page. The problem is that we need to serve separate content on one page. Some dynamic processing must be done. My solution above allows a fairly lightweight process (check a cookie) and a forward to a cached page. It works fairly well, but during very heavy traffic days, even that marginal processing adds enough processing to slow things down and sometimes cause gateway errors (we run nginx/PHP-FPM).

The splash pages do well with drumming up buzz (and actually do better with advertisements), so not doing them is not an option.

How would you manage this problem?

share|improve this question
    
I am a little fuzzy around "The problem is...". Which page? How is it a problem? –  Rarst Apr 22 at 17:42
    
I'm looking for the most efficient way to achieve what I've described above, and if you think there is a better way to do what I've done than having some in-the-theme pre-processing with the caching turned off. –  Erik Westlund Apr 22 at 17:42
    
So far I don't have a fix what is your bottleneck. Is it a slow page generation time? Slow WP core loads due to redirects from page to page? –  Rarst Apr 22 at 17:46
    
The main issue is just that by bypassing caching on our main page and doing some pre-processing, the server load jumps. It's not a big deal when traffic is low, but during a huge day the marginal difference can be quite stressful on the servers (stressing CPU cores to 100%). Perhaps my problem isn't the splash page, per se, but simply that I need load balancing. What I do find somewhat confusing is that the pre-processing is quite light. It's just a few if statements -- not too far from what I do on other pages. Perhaps it's because it loads the WP apparatus around it. –  Erik Westlund Apr 22 at 18:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.