[web-devel] Haskell web application hosting

Michael Snoyman michael at snoyman.com
Sat Mar 26 18:32:44 CET 2011

Hi all,

JP Moresmau recently sent me an email asking for recommendations on
hosting a Yesod app. I think a number of you have heard me mention the
idea of setting up a WAI web hosting system (code named Lambda
Engine). I think it's time to start hitting this idea hard, and I'd
like community involvement as much as possible.

I think we have two extremes we can approach this from: at the one
end, we can provide a complete hosting solution, similar to Heroku[1].
People would simply "cabal sdist" their project, type "lambda-engine
upload mytarball.tar.gz" and their site would be live. Lambda Engine
would automatically handle database server configuration, DNS setup,
and so on.

At the other extreme, we could simply provide a set of shell scripts
for setting up a vanilla Ubuntu (or Debian, or Cent, or FreeBSD...)
install to support compiling a WAI application, provide an nginx
setup, etc. The user would be responsible- and have the freedom to-
set up his/her own server however he/she wants.

There are lots of in-between points on that spectrum. For example, I
was thinking of perhaps providing a central compilation server that
everyone could use. In my experience, Haskell applications take very
few resources to run, but actually building the things take a while.
Compiling on a local system and then uploading is painful because (1)
you have to deal with architecture issues and (2) you might have a
slow upload speed.

Anyway, I'm very interested to hear what other people think about all
this. I'll enumerate a bunch of random thoughts on this topic:

* Should this be a for-profit venture, bankrolled by a few members, or
a community, non-profit approach? (I'm favoring the latter.)
* If we decide to provide some serious hosting power, we might be able
to make a deal with a hosting provider, stating that we're
representing the "entire Haskell web community".
* I don't really think this needs to be WAI specific: assuming we just
use reverse HTTP proxies, this will work for any app that uses
standalone hosting. We could also support FastCGI if we wanted.
* Remember that Amazon is now providing a free tier, which provides a
micro EC2 instance (available as either 32 or 64 bit). I think the
micro instance should be sufficient for running a few web apps, nginx
and PostgreSQL.
* Since starting up and shutting down instances is so easy with
Amazon, we could provide both a "web host" image and a "Haskell
compiler" image. The web host could automatically start up a compiler
instance as needed.
* Are we going to provide email sending support, with all of the
complications of dealing with spam lists, or simply offload to
external services (like Amazon SES[2])?
* Does anyone have a good recommendation on who to use as a host?


[1] http://heroku.com/
[2] http://aws.amazon.com/ses/

More information about the web-devel mailing list