Deploying strategies for small websites
Programming January 28th, 2012
Most one person startups do not have enough infrastructure to deploy on a distributed failsafe website. I was just looking at shared hosting options like Godaddy, Dreammhost, Bluehost and webfaction among others. I was curious about the memory limits offered at each hosting and was too lazy to read their pricing pages for the information. What was easy was to write a short script in python that would just hog some memory and see when my process is taken down by the host.
My script:
a = []
>>> def memory_hog():
... for i in range(1000):
... a.append(a + ["what"])
>>> memory_hog()
>>> memory_hog()
.
x times
.
>>> memory_hog()
Dreamhost was pretty prompt in killing my python processes as soon as the python process hit 512MB of RAM with the following message.
“Yikes! One of your processes (python, pid 22279) was just killed for excessive resource usage.
Please contact DreamHost Support for details.”
It was depressing that Godaddy hosting services only offered python 2.4 but it does not matter for this test. On the specific Godaddy server that I was testing, there was a total of 12G of memory and I was able to easily hog memory for well over 2G and my process was not killed. I did not test my limit to see if the server goes down since python 2.4 was already not worth for me to explore more.
Webfaction claims to have a memory limit of 256MB which is quite constrained.
My hope is to use a combination of AWS and a few of these other shared hosting to deploy the site. Maintaining db server, memcache and lb on aws and deploying multiple webservers on shared hosting seems like a possibility.


