Closed BryanHurst closed 9 years ago
NGinx (engine-x) is more slim than Apache, and it has a more pluginable and scriptable configuration. Plus, it has a better solution for MPMs, so you don't need to compile different variants depending on the forking architecture you need.
uWSGI allows for programmatically launching WSGI server instances (of Django projects) using Emperor mode.
supervisord will keep the Emperor running.
It is messy, but beautiful.
This is a secure implementation as well. All HTTP requests are handled by the www-data user which has access to nothing on the server (doesn't even have a folder for normal html hosting). The Django app is handled by the projects user which doesn't have access to http ports and can only modify project files. Communication between the two is handled by a unix socket that only forwards http requests.
@BryanHurst - how is redundancy/fail over handled?
The Frontend server can be duplicated in different server zones and the network router does load balancing between the different locations. So if for some reason one server goes down, failover to the other would be instant and not noticed with user sessions preserved between the two.
The Cloud Storage Buckets (where user files live) and the Database are both hosted by Google and have builtin backup and redundancy protocols.
Perfect, thanks Bryan.
We need a quick to deploy (for automated hard deployment reasons) and scalable server architecture. The Apache and ModWSGI was a bit heavy and required compiling of MPMs.