I would like to hear how people are scaling their databases for rails applications. I am developing an app that wil be based around searching (user profiles in this example), and I''m curious as to how I can grow it in the event that I begin taking on a large number of users. I have plans to expand into web services, which could add a significant load in theory (of course). Has anyone used MySQL replication and had stable results? Does anyone have any metrics to share? Many thanks in advance, Michael
On 6/17/05, Michael Gorsuch <michael.gorsuch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I would like to hear how people are scaling their databases for rails > applications. > > I am developing an app that wil be based around searching (user > profiles in this example), and I''m curious as to how I can grow it in > the event that I begin taking on a large number of users. I have > plans to expand into web services, which could add a significant load > in theory (of course). > > Has anyone used MySQL replication and had stable results? Does anyone > have any metrics to share?Danga, who run livejournal, have some really interesting stats regarding mysql and scaling. Their current setup handles thousands of hits per second. http://www.danga.com/words/2005_mysqlcon/mysql-slides-2005.pdf http://www.danga.com/words/ What''s more interesting is that it showed how they scaled from 1 server through to their current 100+ setup. Definitely an interesting read. So in short, relax ;)> Many thanks in advance, > > Michael > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers Koz
I appreciate the quick response. I will read, and I will definately relax ;-) On 6/16/05, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 6/17/05, Michael Gorsuch <michael.gorsuch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I would like to hear how people are scaling their databases for rails > > applications. > > > > I am developing an app that wil be based around searching (user > > profiles in this example), and I''m curious as to how I can grow it in > > the event that I begin taking on a large number of users. I have > > plans to expand into web services, which could add a significant load > > in theory (of course). > > > > Has anyone used MySQL replication and had stable results? Does anyone > > have any metrics to share? > > Danga, who run livejournal, have some really interesting stats > regarding mysql and scaling. Their current setup handles thousands > of hits per second. > > http://www.danga.com/words/2005_mysqlcon/mysql-slides-2005.pdf > http://www.danga.com/words/ > > What''s more interesting is that it showed how they scaled from 1 > server through to their current 100+ setup. Definitely an > interesting read. So in short, relax ;) > > > > > Many thanks in advance, > > > > Michael > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Cheers > > Koz >
> > > Has anyone used MySQL replication and had stable results? Does anyone > > > have any metrics to share?Replication does not really help you scale your application unless you restructure your application for it, it''s simply a live backup. If you have a decent replication solution, then they can even provide immediate seemless failover (with most replication solutions, your data is safe, but if the primary goes down your app will be borked until you repoint it) - Jeremy Zawodny has a presentarion outlining replication in MySql[1]. What you can do is direct all writes to the master DB, and have read-only operations directed at the slaves - this is typically performed for intensive reporting applications. If you want scalability from your DB, the easiest way is to have a DB that can run on a variety of hardware, so you can always transfer to some big iron if you need to. Alternatively you''ll need a DB that supports clustering - MySql does, but I''ve no idea if this is part of their commercial offering[2]. Hope this helps, [1] - http://jeremy.zawodny.com/mysql/managing-mysql-replication.html [2] - http://www.mysql.com/products/cluster/ -- sam http://www.magpiebrain.com/