On Tue, Aug 01, 2006, Francis C. wrote:
The high-load sites I’m familiar with still
use apache (LiveJournal and slashdot are two good examples).
which I took to mean that you are part of the engineering team for these
sites and others with similar loads, so you have firsthand knowledge. (I
don’t know how much traffic LiveJournal gets.)
I’m sorry if I gave you that impression. I did work for LiveJournal,
and while I was in the room with the engineers and heard a lot of the
scaling discussion, I was not actively a part of engineering.
What I know of Slashdot comes from hearing discussions between the LJ
and Slashdot engineers about the topic, and from their talks at OSCON
and the like. Far from first-hand knowledge, for sure, but recall that
all I said was that they use apache, and it’s undeniable that Slashdot
is a high-traffic site
The actual application profile determines to a great degree what kind of
scalability you will need, and there are interesting tradeoffs all over
the place. It’s not universally true, for example, that a site becomes
superlinearly more valuable with usage. (Put differently, Metcalfe’s Law
may not be true in general.) That makes it reasonable for people
approaching a site that may someday become really big to use the
commodity-software, outward-scaling approach, which in essence considers
development effort (including time-to-market) to be more expensive than
operational costs.
Of course. I should note that I don’t disagree with you at all. Maybe
I’m off by an order of magnitude, but a site which might burst to 10k
hits/sec just does not strike me as a Google-level site. Since that’s
what the OP was talking about, discussing the techniques of those sites
(while academically interesting) doesn’t seem to have bearing on the
conversation.
My real point (borne out by first-hand experience) is twofold:
First, with extremely large sites (and there are so few of them in
reality that each one is a special case, and there really are no
universally-applicable best-practices), you have to consider that
operational costs at a certain point really do outweigh development
costs. As an extreme example, Eric Schmidt has said that one of the
biggest costs Google faces is for electricity. Well-engineered custom
software can be the difference between economically possible and
not-possible.
True.
Second, with some problems, outward scaling simply can’t be made to
work. One of your examples is slashdot. Think about what /. does and you
can see that there are multiple points where scalability can be enhanced
by partitioning working sets, introducing update latency, etc etc. But
look at something like an ad-serving network, which relies on a vast
working set that is in constant flux. You can’t just scale that up by
adding more machines and more switched network segments. Very early in
that process, your replication-traffic alone will swamp your internal
network. (I’ve seen that myself, which is why I mentioned Ethernet
interpacket delays as a critical factor.)
Again, I agree completely. But (as you mention below), a CRUD-based
framework probably doesn’t make any sense in an ad-serving environment.
Frankly, that’s a much more specialized problem than the average
application, and so again seems tangential to the discussion.
Of course, this is all based on my assumption that the OP is building
the typical Rails site, since he didn’t say anything to the contrary. I
appreciate that very large sites can benefit from customized software
and clever infrastructure. But I also recognize (as was mentioned
previously!) that companies doing those kinds of sites are unlikely to
elect to use Rails unless it’s appropriate for their site.
In the context of a Rails application, outward scaling is going to be
more effective than upward scaling. That’s all I was ever saying
There are many places for Ruby in such an environment. I’m working on
one now that uses a lot of Ruby, but RoR was not an appropriate choice.
We’re using a custom HTTP server that includes a bit of Ruby code,
though.
Very interesting. Does the server encapsulate the application logic as
well, or can it serve other applications? How is the Ruby stuff tied
in?
Ben
ps- I think this is close enough to the topic that it’s not really a
threadjack. People interested in very large sites will be reading this
thread, and a discussion of when and how you have to move past your
framework is interesting and valuable.