Can you build a site using Ruby on Rails that can handle the traffic levels of Myspace?
Of course you can. Scalability is mostly a product of good planning, good seperation of components and good coding/selection of algorithms.
The current in vogue method for scaling with ruby on rails is to use <a href="http://mongrel.rubyforge.org/">Mongrel</a> (ruby based web server) as your application server on the backend. You can setup multiple servers running Mongrel to help you scale when you need to. You then setup your front-end web server (Apache, LightHTTPD, whatever) to proxy requests to Mongrel and you can then setup various load balancing algorithms to distribute the load. You can scale out the front-end web server instances as well by putting a hardware or linux based web load balancer in front of them.
Finally, if you develop a serious database backed web application you will likely find that one of the main bottlenecks is the database not the application code. To alleviate this consider caching solutions like <a href="http://www.danga.com/memcached">memcached</a> which has good support built into ruby and rails.
The search for people who can answer your question continues for as long as needed - until you find the answer you were looking for.
When an answer is posted by someone who was invited (byYedda or by yourself) to answer your question, their answer is marked with a yellow "invited by Yedda".
To be invited to answer other people's questions in your areas of knowledge and interest, be sure to list your favorite topics:
» My Settings My Topics.
Of course, the more helpful your answers are, the more likely you are to be invited to future questions...
well, theoretically - there should not be anything preventing one from building a RoR service capable of sustaining a MySpace load factor.
However, I don't believe this has yet been done, and more importatntly, will defanetly require some unique & new solutions for problems that arise from heavy traffic like MySpace would have.
robblatt.com
I would say that it could handle it. The largest aimplementation of RoR I know of is Penny Arcade and I don't recall it being down since they switched.
www.penny-arcade.com
Yes, you can. By using distributed technologies(memecached, etc..) you can use almost any programming structure to handle that type of load. The areas you would have to watch is the underlying code, as you may want to code some of it in C or another compiled language so that it will be a little faster.
the short answer is yes
The long answer:
Let's cover the basics.
* scalability has almost nothing to do with performance. Scalability is being able to add hardware and gain more throughput proportionaly to the hardware added.
* performance/speed is being able to do more on the same hardware.
In fact, Ruby is a dog performance wise. It is definetly slower then perl, python and php. Benchmarks vary from twise as slow to as much as 5 times slower. Where Ruby and in particular Ruby on Rails shine though is speed and easy of development. So if you need 'speed' choose something else, if your concern is 'time to market' RoR is a great choice.
Now when we done with 'speed' let's look at 'scalability'.
To be able to scale to MySpace's size you need to get to a point of 'linear scalability'. i.e. when to serve 2x users you need 2x hardware.
Since you can easily add more frontends (running RoR, php, python whatever), the usual bottleneck in scalability is indeed a database. But the good thing is that sites like MySpace, Blogger, LoveJournal are fairly easily partitioned. i.e. my profile can sit at database db13, and your profile can sit at db37 thus solving the db bottleneck.
Problems start when you have some data that needs to be centralized, or shared between users. (For example you do some DB joins with users table and some other table, then that other table can not be easily partitioned). The are many techniques t osolve this problem (duplicating data, doing joins in application lever etc), but they are not related to RoR at all. it's all just carefull system architecture design. not trivial, but doable.
For a good primer on scaling web sites read Building Scalable Web Sites by Cal Henderson (flickr).
Hope this helps
Got an answer for sudonim? Would you like to comment on the posted answers, or vote for the one which you think is the best?
Sign up for a free account, or sign in (if you're already a member).
Other people asked questions on similar topics, check out the answers they received:
Other people asked questions on various topics, and are still waiting for answer. Would be great if you can take a sec and answer them