BlogKontaktTagcloud

Scaling is not about...

Amdal's Law, do you remember from school?! But not important for this article.I hear and read the world scaling so often lately that I earnestly think about giving it a fixed field on my bullshit bingo card. As a lot of words on bullshit bingo, scaling is often misused.

After talking with Mirko and reading a lot of blogs I really think the world needs yet another one. So this article tries to try to kill 4 common misunderstandings of scaling, because scaling is not about…

[more after the jump]

...speed

Often you hear speed and scaling together. This might be no surprise, as you will get slashdoted (or nowadays digged) and when your site load will explode, you might hear the manager screaming in the hallways: „We need speed, erhm scalability, erhm speed!“ He’s right! You need both, but he’s also too late by now. You (and he) should better have thought about it before.

But even though you need speed and scalability, it’s absolutely not the same. Speed is about getting as much from your hardware as necessary, scalability is about running your app on as much hardware as you need. There are people out there who really suck at speed but are doing great at scaling. For example this startup animoto needs 4500 boxes (or Amazon computing cloud instances) to run a few dozen users (20'000 actually). So there speed horribly sucks, but they scale at a level only a few people do.

They scal great, but they do suck at speed!

This brings me to the point why scaling is more important than speed. And this thought is sowhat stolen from Terry. Speed is a luxury problem! As long as you have no users, speed does not matter. So if you’re hit by a lot of users and you’re able to scale, you might just be able to scale up and burn a lot of money. The animoto guys must currently burn around 10'000$. You will find out that you suck at speed when you're working day and night to optimize speed, because burning 10’000$ a day is definitely no fun. The other way round: If you’re working on speed instead of scaling and you get hit by the crowd you will do pretty well for some time but then, as your single box is not doing the job anymore, you will … erhm … fail!

...Memcached

Well, very often I hear or read something like: „Well this website bla bla bla bla scaling bla bla bla memcached bla bla bla...“. Memcached is not about scaling! As the name says, Memcached is about caching and therefore about speed.

I already hear some of you screaming! You’re right! Memcached itself is also about scaling because memcached itself does scale very well. I think memcached, in it’s simplicity with a hash-based distribution system, was ahead of his time when it was created. So memcached itself does scale, but only because you're using it, it doesn't mean that your application will scale as well. For you it will only help for your speed (and therefore it’s probably one component that will help you scale better then linear).

Scalling better then linear, stuff that makes your manager happy! (Thanks to the tilllate guys for the picture.)

...Languages

“Languages don’t scale, architectures do!” There might be programming languages that run faster than others, but this has no influence on the scaling. Even with Erlang - when you don't have an architecture that is meant to scale it won't work.

If you take a language that is fast, it’s probably one that’s harder to handle (assembler, c, c++) and therefore going to slow you down in development speed. Usually, developers get an exorbitant high salaries, so it might be better to develop a system in a language that does not slow down your developers and that scales nice. Sure, you'll have to buy some more boxes, but if you can save some money on developer salaries it might be worth it.

...3-tier

I think this whole “tier” discussion is so what of 90's. But I read this article about the „Indian twitter“ and this guy said that if you don't have 3 tiers, then you can go home! I think that’s not quite true. It just doesn't matter! If you have a good architecture on 3-tier it might work well, and if you have a good one on two tiers it might work as well! If you have two tiers, you probably need some components (like queues, caches) to bring your system on the way. But they have no business logic in it and you can take them out of the box, therefore they’re easy and cheap.

I personally do not believe in 3-tier architectures for websites. Most websites might just not have enough “business logic” to make another tier out of it.

So we 're now getting to the point of whether technologies scale or not. There are many out there who say „technologies do not scale“. I do not quite agree with this. With a good architecture you can scale nearly everything, but there are technologies that scale better and such that do worse. Stateless web server, as PHP guys say share nothing architectures, for example scale pretty good. On the other site relational databases do a very bad job at „out of the box scaling“, as an architect you have to put quite a few brain cycles in it to make it scale (and depending on the complexity of your data it might stay hard to keep them scaling).

End

You still with me? Well, I think the most important thing is that scaling is not about speed. If you get hit by the crowd you might need speed and scaling. But speed does probably not matter that much anymore as CPU cycles get cheaper and cheaper (and you can buy them on demand). If you do not get your system to scale, the cheap CPUs will not help you.

Ähnliche Beiträge:
PHP Quine
What's php like?
Zend Framwork 1.5 is out
Coding Contest addicted
Coding Contest
Comments (0)  Permalink

comments

add a comment

The Trackback URL to this comment is:
http://leo.freeflux.net/blog/plugin=trackback(2656).xml

This blog is gravatar enabled.
Your email adress will never be published.
Comment spam will be deleted!

Name*
E-Mail
For Spammers Only
URL
Kommentar*
E-Mail Benachrichtigung bei neuen Kommentaren zu diesem Eintrag
Speichere meine Daten (braucht Cookies)