The following post talks a bit about the hosting environment I built for my personal site. Please feel free to ask me questions on the following configuration and I will do my best to answer them. Now, let's light this candle.
Lnoldan.com in the past has been a testbed I've used for getting more familiar with technologies used during my day job at Six Feet Up. I recently re-deployed the site on Plone4 Beta 3 with RelStorage using some of the technologies we deploy daily to create the best hosting environment possible for this site. The attached diagram shows the pieces I am using, and how they are connected to one another to host this site.
At the head of the hosting chain we have the nginx web server. This is configured primarily to manage virtual hosting between lnoldan.com and my soon-to-be deprecated w9zeb.org WordPress site. It also manages SSL for encrypted site access and authentication.
If the web request is for w9zeb.org, it is passed to a FastCGI process, which in turn connects to the MySQL database on the back end. Nginx isn't able to parse PHP content by itself, which is the reason for the FastCGI process. I hope to move the content from that WordPress blog into Plone in the near future.
If the web request is for lnoldan.com, it is passed to my varnish caching server. If varnish has the request in cache, it will serve the request directly, which is very fast. If varnish did not have the request cached, it goes to its back end, which in this case is another running nginx process. This instance of nginx is where I have the VirtualHostMonster configured for Plone. The advantage here is that the URLs being processed by varnish are identical to the URLs the end user sees in his or her browser address bar.
The VirtualHostMonster proxypass sends traffic to HAProxy load balancer, which sets a cookie to help determine which back end any given session should be re-directed to on future requests. This balances traffic to four Zope 2.12 instances. These instances are configured to use RelStorage with PostgreSQL as the back end datastore for the ZODB. I have also configured RelStorage to use memcached.
The method currently used by RelStorage to interact with memcached isn't quite ideal, but it's functional. When a request comes in, the Zope instances first query memcached. If the data is there, it serves it. If memcached does not have the data, RelStorage sends the query to PostgreSQL. Once the response is received from PostgreSQL, RelStorage sends the response to memcached so it's available for future requests. Simultaneously the request is processed by Zope and sent upstream towards the end user.
Hopefully this makes sense and provides ideas to help solve your hosting needs as well. The specifications on this Virtual Private Server are as follows: I am running FreeBSD 8.0-Release (32bit) with 1.5gb of memory, 2 virtual CPUs, and 45Gb of disk space. I am using supervisord with memmon to manage the four running Zope instances. Memmon is configured to allow not more than 150mb of memory to be used per instance before restarting them. All other services are configured to run via the FreeBSD rc system.
If you would like to see any of the configuration files in this hosting stack, including the buildout for the site you can email me at: firstname.lastname@example.org.