carthago — 2012-10-15T05:56:22-04:00 — #1
Due to stability issues with our site we are revamping our server configuration.
I am running a wordpress site that I want to run the following way;
I have 2 servers. Server #1 and Server #2.
I want Server #1 to be the front end, and Server #2 to be the nginx proxy.
This way the files are being generated locally on Server #1, and then being copied by SSH/FTP to Server #2, the proxy.
By using this setup Server #2 keeps running even though Server #1 has any kind of problems.
At the moment I am using W3 Total cache for my caching, but it doesn't support this configuration.
Can anyone point me in the right way to realise this?
logic_earth — 2012-10-15T06:28:52-04:00 — #2
What you are actually doing it moving the weak link to Server #2. If Server #1 fails sure it will satisfy that case, but what if Server #2 fails, what then? What you actually need is a cluster of servers that are load balanced with one another. Redundant Servers doing the same thing.
Basically, I call what you are doing, throwing a band aid on the real problem instead of fixing it.
carthago — 2012-10-15T06:33:28-04:00 — #3
No, because the site will continue running even if it can't access the database, because it serves up static pages...
logic_earth — 2012-10-15T07:02:34-04:00 — #4
Thats not my point. What happens when Server #2 fails?
carthago — 2012-10-15T07:10:06-04:00 — #5
Correction: If server #2 fails we have a 3rd server to pick up the traffic.
carthago — 2012-10-15T07:36:03-04:00 — #6
I need a way to generate static pages from my wordpress site, which I then serve to people. But as I'm using Woocommerce, it's been quite a hassle
wwb_99 — 2012-10-15T08:51:56-04:00 — #7
Ecommerce stuff usually fails as static. Even if you can serve the pages, you can't take orders.
Hit the real problem -- stability in your wordpress setup.
carthago — 2012-10-15T09:26:02-04:00 — #8
I've macgyverd my forms and stuff into Iframes which I host externally, so that keeps working. I just want to convert my Wordpress/Woocommerce site into static html files which sync.
eastcoast — 2012-10-15T10:14:24-04:00 — #9
There are people out there doing similar to what you need with varnish e.g [1 [URL="http://danielmiessler.com/blog/optimizing-wordpress-with-nginx-varnish-w3-total-cache-amazon-s3-and-memcached#nginx"]2](http://cd34.com/blog/infrastructure/w3-total-cache-and-varnish/) There was a wp varnish plugin but it's not been updated in ages, but might prove a useful starting point. I'd always look to separate a caching proxy from your primary web server.
shahzad_saeed — 2012-10-16T04:16:08-04:00 — #10
You can learn how to configure W3 Total Cache with WordPress-Nginx here.
If this didn't solve your problem, please let me know
carthago — 2012-10-16T05:12:51-04:00 — #11
Thanks alot, I'm going to check this out and see if it works!
Will get back with the results
shahzad_saeed — 2012-10-16T05:17:37-04:00 — #12
And I'll be waiting...