From: Dario Teixeira <darioteixeira@yahoo.com>
To: caml-list@yquem.inria.fr, Joel Reymont <joelr1@gmail.com>
Subject: Re: [Caml-list] scalable web apps
Date: Sun, 25 Jul 2010 06:52:46 -0700 (PDT) [thread overview]
Message-ID: <407966.39005.qm@web111512.mail.gq1.yahoo.com> (raw)
In-Reply-To: <914B9960-EBC8-439B-B7F8-A852859B522F@gmail.com>
Hi,
> How do you build scalable web apps with OCaml?
> Do you use Apache with mod_caml? Naked Ocsigen?
> Do you put Ocsigen behind Nginx?
Your question is quite open-ended. There are several "scalability crisis"
that an web app is expected to confront as it grows from handling at most
a handfull of requests per second to dealing with tens or even hundreds of
thousands of requests per second. Are we talking about surviving a "mere"
Slashdot effect (not as scary nowadays as it once was), or about competing
with Facebook?
Naked Ocsigen -- particularly naked native-code Ocsigen -- should serve
you a long way in the initial stage of the growth path. In fact, I suspect
you'll run into scalability problems with the database backend much sooner
than you'll find them on the Ocsigen side. (For caching DB requests, I
reckon that Ocsigen's Ocsigen_cache module should be sufficient for this
early stage, single Ocsigen server situations).
The only circumstance where I would be cautious on relying solely on a
naked Ocsigen is if you are also required to serve plenty of static content
(images, etc). Even though Ocsigen includes an extension for serving static
pages, for hysterical reasons no Unix supports non-blocking mode for regular
files, which of course causes problems for Lwt-apps (see the Lwt manual for
more information on this). Therefore, in this context you may get better
results by having another server (like Nginx) dedicated to static content.
As Sylvain mentioned, in my talk I discussed that Ocaml's single-coredness is
in no way an obstacle to scaling an web app beyond a single Ocsigen server.
However, at this stage of growth you'll also have to consider using a
distributed caching mechanism, such as Memcached or Wink's Cache [1] (the
later developed in Ocaml by Gerd Stolpmann et al).
Best regards,
Dario Teixeira
[1] http://oss.wink.com/cache/
next prev parent reply other threads:[~2010-07-25 13:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-24 7:49 Joel Reymont
2010-07-24 8:57 ` Sylvain Le Gall
2010-07-24 10:55 ` [Caml-list] " William Le Ferrand
2010-07-25 13:52 ` Dario Teixeira [this message]
2010-07-25 19:19 ` Joel Reymont
2010-07-26 7:29 ` Török Edwin
2010-07-26 7:59 ` Jérémie Dimino
2010-07-26 8:19 ` Török Edwin
2010-07-27 6:46 ` Jérémie Dimino
2010-07-26 11:27 ` Dario Teixeira
2010-07-26 19:57 ` Jake Donham
2010-07-26 20:02 ` Török Edwin
2010-07-27 6:55 ` Jérémie Dimino
2010-07-26 9:11 ` Sylvain Le Gall
2010-07-26 11:10 ` [Caml-list] " Dario Teixeira
2010-07-26 12:58 ` Sylvain Le Gall
2010-07-26 13:20 ` [Caml-list] " William Le Ferrand
2010-07-25 19:46 ` [Caml-list] " Richard Jones
2010-07-25 21:45 ` Dario Teixeira
2010-07-25 21:56 ` Joel Reymont
2010-07-25 22:03 ` Gabriel Kerneis
2010-07-25 22:24 ` Dario Teixeira
2010-07-26 7:34 ` Richard Jones
2010-07-26 11:20 ` Dario Teixeira
2010-07-26 16:50 ` Florent Monnier
2010-07-26 17:10 ` Sylvain Le Gall
2010-07-26 17:21 ` [Caml-list] " Gabriel Kerneis
2010-07-26 17:37 ` Sylvain Le Gall
2010-07-25 22:44 ` [Caml-list] " Yoann Padioleau
2010-07-26 9:08 ` Sylvain Le Gall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=407966.39005.qm@web111512.mail.gq1.yahoo.com \
--to=darioteixeira@yahoo.com \
--cc=caml-list@yquem.inria.fr \
--cc=joelr1@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox