[Mono-dev] Architectural decisions behind mod_mono
kumpera at gmail.com
Sun Mar 8 18:35:31 EDT 2009
On Sat, Mar 7, 2009 at 6:05 AM, Hiawatha <imaudi at comcast.net> wrote:
> Hi all - I'm investigating the possibility of porting a site from
> .NET/Windows Server to Apache/Mono and am doing some homework about running
> Mono applications on the web. As it stands, it seems the two choices are
> XSP, which is designed to be a test/debug server and not for highly
> production applications, or mod_mono which is a module that is compiled
> Apache. From what I understand, mod_mono requires mod_mono_server which
> answers inbound requests over a TCP/IP socket. I'm having a hard time
> understanding this design. First off, for every inbound socket opened in
> Apache, a new socket is opened for mod_mono_server, along with all the
> overhead on the network stack. In the Windows world, IIS hosts the CLR in
> process and the two are very tightly integrated. What's stopping Mono from
> incorporating this design?
The main issue is the lack of reliability on such solution.
> I'm assuming Java does not have a separate Java server which Apache
> requests to.
You're wrong. All java web application are hosted on separate processes,
this is true for
all major containers (tomcat, jetty, webfear and so on).
> Can't Apache just be configured to natively run Mono applications in
> process? Would this be a massive architectural change to the Mono runtime?
> As it stands right now, I don't see a possibility for any MySpace/Facebook
> level web applications running on Mono because I simply can't see mod_mono
> being able to scale to that level.
This is a minor issue that should pose no scalability issues on itself.
> Perhaps some of the hard core Mono runtime guys can comment, I'm sure
> they're 843x smarter than I am and there's very good reasons why mod_mono
> was designed the way it is, but I'm wondering how this compares with PHP,
> Java, etc which all seem to be tightly integrated in with Apache. Are
> any plans to incorporate the Mono runtime directly into Apache, or maybe
> write a highly performant Mono server similar to Sun's Java Web Server?
> not trying to criticize any design decisions, I'm very new to Mono and UNIX
> server architecture and am just trying to understand the reasons behind
> this. Thanks!!
The cost of doing local IPC, be it with unix sockets or tcp/ip, is minimal.
in terms of reliability is, on the other hand, big.
This is a very common setup, it's the recommended way with Java, Ruby and
Python, at least.
The advantage is that the target running the application can crash without
making the whole
machine unavailable. The other is that it's easier to periodically restart
the back-end to be
sure things like memory leaks don't bring the machine down.
In the end, it's a choice that gives a very small performance penalty in
trade of a huge reliability gain.
It's much better this way and I don't see any compelling reason to move to a
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list