Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I currently have a high traffic WordPress site that is entirely static. But it currently generates each page via the MySQL database anyway (I know I should be caching content).

I will be moving the database to another server which will take about 20 minutes and I would like a cached version to be displayed while the MySQL server is unavailable.

It this easy to achieve using Nginx alone?

share|improve this question
    
What do you mean Varnish doesn't support HTTPS? –  ceejayoz Sep 20 '13 at 20:45
    
I may have mis-understood some of the Varnish documentation. Removed that from my post. –  Justin Sep 20 '13 at 20:46
    
Why are you going to have downtime? This is easy to accomplish without any downtime at all using replication. –  Michael Hampton Sep 21 '13 at 11:41

1 Answer 1

yes, ist easy;

  • setup proxy_cache with cache_time ~ 24hrs (off.docs)
  • run wget over your site (generate a cached version of each page)
  • make your maintainance
  • after this, change cache_time to something like 5min or 1 hour
share|improve this answer
    
Could you go more in-depth on the wget portion of this? –  Justin Sep 28 '13 at 20:47

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.