Forum: Ruby on Rails scaling...the other way

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8dad1ec4d769734583f45fbbee5cd009?d=identicon&s=25 Jeff Pritchard (jeffpritchard)
on 2007-06-26 04:26
There has been much discussion here about scaling to host a "normal" app
for lots of traffic.

I'm wondering if there are any particular difficulties with scaling a
rails app itself up to gargantuan proportions, with just moderate
traffic.

For instance, a "normal" app does one thing and does it well.  It might
have one or two or a dozen models, and one or two or a dozen
controllers.

What happens when you build a truly huge Rails app, with maybe close to
a hundred models and a hundred controllers and... you get the idea.  A
monster app that most people would say should have been designed as 50
or 100 separate Rails apps...but you want to run it all on one server,
with moderate traffic.

Let's look at it from another perspective.  Let's say that a particular
set of hardware was empirically determined to be satisfactory to host an
ordinary Rails app with say 10,000 "registered users" who each use it
casually rather than intensive all-day use by each user.  If those same
users were using a really huge Rails app on the same server, they could
never use more than one part of the app at a time, so the number of hits
and pages requested, etc. would be the same regardless of the size of
the app.

So does the size of the app matter in any material way?  Obviously you
have to have a little more disk space to hold the program and plenty of
RAM to avoid lots of virtual memory paging...but beyond that, does the
size of the app matter?  Perhaps a large negative effect on caching,
since there are so many different pages available.

I'm contrasting this to the alternative of making it "look like" one big
app by having a large number of separate Rails apps running on the same
hardware and maybe using sub-domains or something to spread it out.  In
my limited experience, there seems to be a rather large memory hit for
adding just one more Rails app to a server (in my case, running Lighttpd
proxied from Apache).

Ignoring for the moment the expected programming burden of maintaining
one gargantuan Rails app vs. 50 to 100 small Rails apps...would the
hosting be considerably easier/cheaper with one big app?

thanks,
jp
6e9db38e16957cc51cf9cee9de399249?d=identicon&s=25 Gabe da Silveira (Guest)
on 2007-06-26 08:06
(Received via mailing list)
Ignoring the engineering of a huge app the answer is simple: one app
always uses fewer resources than the equivalent functionality split up
into many small apps.  Mostly you'd just be using less RAM.

Whether or not to separate the functionality into multiple apps would
depend on the nature of the functionality (if you want to have a
single login for instance, than it should probably all be in one app).
 The resource usage would be very low on my list of considerations.


On 6/25/07, Jeff Pritchard <rails-mailing-list@andreas-s.net> wrote:
> controllers.
> casually rather than intensive all-day use by each user.  If those same
>
>
> thanks,
> jp
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


--
Gabe da Silveira
http://darwinweb.net
This topic is locked and can not be replied to.