As we have mentioned before, Yesod is built on the Web Application Interface (WAI), allowing it to run on any WAI backend. At the time of writing, the following backends are available:
The last two are not intended for production deployments. Of the remaining four, all can be used for production deployment in theory. In practice, a CGI backend will likely be horribly inefficient, since a new process must be spawned for each connection. And SCGI is not nearly as well supported by frontend web servers as Warp (via reverse proxying) or FastCGI.
So between the two remaining choices, Warp gets a very strong recommendation because:
It is significantly faster.
Like FastCGI, it can run behind a frontend server like Nginx, using reverse HTTP proxy.
In addition, it is a fully capable server of its own accord, and can therefore be used without any frontend server.
So that leaves one last question: should Warp run on its own, or via reverse proxy behind a frontend server? For most use cases, I recommend the latter, because:
As fast as Warp is, it is still optimized as an application server, not a static file server.
Using Nginx, you can set up virtual hosting to serve your static contents from a separate domain. (It’s possible to do this with Warp, but a bit more involved).
You can use Nginx as either a load balancer or a SSL proxy. (Though with
warp-tls it’s entirely possible to run an https site on Warp
So my final recommendation is: set up Nginx ...