[erlang-questions] Static files served through Webmachine

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue Jul 19 14:00:45 CEST 2011


On Tue, Jul 19, 2011 at 03:27, Tristan Sloughter
<tristan.sloughter@REDACTED> wrote:

> Can anyone think of a way I can keep the nice URLs and serve the static html
> files through nginx or another webserver.

Put a Varnish accelerator in front of your system
(https://www.varnish-cache.org/). That way, it doesn't matter if your
backend is slow at serving files as the accelerator will just cache
static stuff for you. In addition, you avoid the trouble of going
through another system as a proxy for static content. Also, the
solution is quite modular. On the development system, you don't need
more than a single system running Erlang.

In my opinion, there is little reason not to plug into the whole
industry there is where the main point is to make serving HTTP go
faster. Trying to beat that with Erlang is probably possible, but I
don't think it is beneficial. Varnish is really really hard to beat.
It is built specifically for being insanely fast and it serves its
data from a shared mmap()'ing, scales to multiple CPUs and is a big
blob of nasty C code. I'd rather stand on the shoulders here than
trying to mess with it myself.


-- 
J.



More information about the erlang-questions mailing list