Live data from Hacker News

Server Farm Setup for Knife Depot

musumeche.com

11–19 of 19 posts

Re: Server Farm Setup for Knife Depot

#11
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

#13
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

#15

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 set…

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

#17

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).

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

#19

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 set…

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".

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.
Post reply on HN