[erlang-questions] Static files served through Webmachine
Thu Jul 21 01:38:17 CEST 2011
Kenny, yeah, thats what I was thinking of doing as a cache method if I
couldn't use something easily in front of Webmachine like Varnish (didn't
actually think of Varnish until Jesper brought it up. Maybe a bit of both...
Since while I don't want to use any templating on the backend, I want to end
up with a general web framework from all this.
On Wed, Jul 20, 2011 at 3:47 PM, Kenny Stone <kennethstone@REDACTED> wrote:
> I wonder if an ets solution wouldn't be as good, as these solutions are
> just going to find some way of holding the data in memory anyways. WIth
> ets, you can do things like hold compiled erlydtl/mustache templates inside
> of it...
> On Tue, Jul 19, 2011 at 11:47 AM, Garrett Smith <g@REDACTED> wrote:
>> If you're already using Nginx and just want control over URLs, you
>> have access to the standard rewrite module:
>> This is not 30x redirection btw, unless of course you want that.
>> On Tue, Jul 19, 2011 at 9:24 AM, Tristan Sloughter
>> <tristan.sloughter@REDACTED> wrote:
>> > Sam, Jesper both these sound great, thanks! I'm also going to look into
>> > Jack was saying about how Rails handles some stuff.
>> > But I'm leaning towards Jesper's idea with Varnish being the best... I'm
>> > of those people who scoff at most benchmarks so not sure I'll bother to
>> > one for this, but maybe, if someone here can A) suggest the best setup
>> > it B) if it makes sense at all or would just be another worthless
>> > that really gives no information about reality.
>> > Thanks!
>> > Tristan
>> > On Tue, Jul 19, 2011 at 7:00 AM, Jesper Louis Andersen
>> > <jesper.louis.andersen@REDACTED> wrote:
>> >> 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
>> >> > 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.
>> > _______________________________________________
>> > erlang-questions mailing list
>> > erlang-questions@REDACTED
>> > http://erlang.org/mailman/listinfo/erlang-questions
>> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions