News for hackers. Stuff that matters.
Re:Server Farm Setup for Knife Depot by brianwawok on Friday July 03, 2015 @12:00PM (#9826284)
Thoughts as I run a similar (but completely different) setup on DO.

1) Have you considered DNS round robin for your nginx and varnish servers? Running 2 of each (at half size) would let either one die and nothing bad happen to your site.

2) Are you ok with MongoDB being a SPOF?

3) Are you okay with your main DB being a SPOF?

I ask this not to be snarky, but I see that you are 84% of the way to having a SPOF proof setup, but not quite all the way there. I know I sleep a little better at night knowing that if my nginx box blows up, I have more with DNS round robin to keep everything running till the morning.

Re:Server Farm Setup for Knife Depot by smusumeche on Friday July 03, 2015 @03:02PM (#9827342)
Good suggestions! The only issue I see is that if the traffic was split between two different varnish servers, the cache would take twice as long to "warm".
Re:Server Farm Setup for Knife Depot by brianwawok on Friday July 03, 2015 @03:11PM (#9827400)
Yah that is true. I would still prefer a slower to warm cache than a 1 server dies the entire app is dead, right? Depends on the app I spose.
Re:Server Farm Setup for Knife Depot by oceanic on Friday July 03, 2015 @02:30AM (#9823876)
Nice diagram, I'm borrowing it as a reference for the setup I'm going to be designing for work soon :-)

Did you consider running nginx for your PHP application servers as well?

Also, can I ask what sort of traffic you get per {{ time period }} ??

Re:Server Farm Setup for Knife Depot by smusumeche on Friday July 03, 2015 @07:58AM (#9824935)
Not that much. Apache gets about 30-40 requests per second on average. However, this is with Varnish handling a lot of requests that never get sent to the backend.
Re:Server Farm Setup for Knife Depot by nodesocket on Friday July 03, 2015 @02:08AM (#9823807)
I would remove varnish and use nginx anyday. Varnish config makes baby jesus cry.
Re:Server Farm Setup for Knife Depot by smusumeche on Friday July 03, 2015 @07:56AM (#9824924)
Nginx doesn't do the advanced cache invalidation based on tags in a header.
Re:Server Farm Setup for Knife Depot by heydonovan on Friday July 03, 2015 @10:52AM (#9825884)
Like others have said, I'd ditch Apache/Varnish for Nginx/PHP-FPM with the ngx_cache_purge module. That's what I've done, and it's far easier to maintain. The VCL language has always struck me as overly complicated, but that's just me. Any reason you chose MongoDB over Redis? (I work with MongoDB and Redis on a daily basis, so I was just curious as to why you chose one over the other for session storage).
Re:Server Farm Setup for Knife Depot by smusumeche on Friday July 03, 2015 @03:03PM (#9827354)
I chose MongoDB because Symfony has a built-in MongoDB session handler that is included with the framework.
Re:Server Farm Setup for Knife Depot by mfr8 on Friday July 03, 2015 @11:24AM (#9826054)
That's a great diagram. What do you use to create your diagrams?
Re:Server Farm Setup for Knife Depot by jefurii on Friday July 03, 2015 @02:44PM (#9827234)
++ I'd like to know what software was used. Please!
Re:Server Farm Setup for Knife Depot by smusumeche on Friday July 03, 2015 @03:06PM (#9827370)
I used LucidChart free account :)
Re:Server Farm Setup for Knife Depot by smusumeche on Friday July 03, 2015 @03:02PM (#9827343)
I used LucidChart free account :)
Re:Server Farm Setup for Knife Depot by icpmacdo on Friday July 03, 2015 @02:58AM (#9823964)
Would it be possible to take something like that UML, package it up in Docker and have it deploy to your vps in a more complex heroku way? I think that would solve a few common problems.
Re:Server Farm Setup for Knife Depot by mrweasel on Friday July 03, 2015 @04:29AM (#9824294)
I can't really figure out if you're being sarcastic or not. There's really no need to add complexity to a setup this simple. Docker would just be another tool to learn and maintain, with very little gain.
Re:Server Farm Setup for Knife Depot by mattkrea on Friday July 03, 2015 @12:10AM (#9823401)
Why do you dislike NGINX?
Re:Server Farm Setup for Knife Depot by smusumeche on Friday July 03, 2015 @07:57AM (#9824929)
I don't dislike it at all. I just was hoping to have varnish handle everything on that server.
Re:Server Farm Setup for Knife Depot by mattkrea on Friday July 03, 2015 @08:59AM (#9825259)
Ah ok, gotcha. As I have to maintain a few legacy PHP servers.. I would strongly recommend you take a look at NGINX + PHP-FPM replacing Apache too so you can simplify the stack a bit.

NGINX is pretty awesome as a reverse proxy (as you must know) but its very nice when you use it as your web server too.