# Scaling...the other way

**URL:** <https://www.ruby-forum.com/t/scaling-the-other-way/107780>\
**Category:** Rails\
**Created:** [June 26, 2007, 4:26am UTC](https://www.ruby-forum.com/t/scaling-the-other-way/107780 "2007-06-26T04:26:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [June 26, 2007, 4:26am UTC](https://www.ruby-forum.com/t/scaling-the-other-way/107780/1 "2007-06-26T04:26:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [June 26, 2007, 8:06am UTC](https://www.ruby-forum.com/t/scaling-the-other-way/107780/2 "2007-06-26T08:06:40Z")

</div>

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 P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> controllers.  
> casually rather than intensive all-day use by each user. If those same
> 
> thanks,  
> jp
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Gabe da Silveira  
[http://darwinweb.net](http://darwinweb.net)
