Chamroeun Sok
2009-May-28 08:43 UTC
500,000 to 1million records a day. Can Rails scale to that?
Hi all, We are planning to use rails+mysql to develop a website that sells Lotto Tickets. We expect 500,000 to 1 million(/8 hours) tickets sold a day. Each records should be 100 bytes long only. And we also need to use SSL+Transaction Support. The big question is Can Rails support that amount of traffic? Or I better consider PHP? Best Regards Chamroeun -- Posted via http://www.ruby-forum.com/.
Roderick van Domburg
2009-May-28 11:35 UTC
Re: 500,000 to 1million records a day. Can Rails scale to that?
Chamroeun Sok wrote:> We are planning to use rails+mysql to develop a website that sells Lotto > Tickets. We expect 500,000 to 1 million(/8 hours) tickets sold a day. > Each records should be 100 bytes long only. > > And we also need to use SSL+Transaction Support. > > The big question is Can Rails support that amount of traffic? Or I > better consider PHP?The short answer: sure, you should be able to. You should work out to how much requests/seconds this equates and find out how much time those actions spend in the Rails framework. Simulate load using e.g. JMeter on a development server with varying levels of concurrency and look at the graph. You''ll be able to calculate the number of servers you require. You will likely want to handle SSL on your load balancers, not in Apache. -- Roderick van Domburg http://www.railscluster.nl -- Posted via http://www.ruby-forum.com/.
Courtney Wade
2009-May-28 15:09 UTC
Re: 500,000 to 1million records a day. Can Rails scale to that?
On May 28, 4:43 am, Chamroeun Sok <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi all, > > We are planning to use rails+mysql to develop a website that sells Lotto > Tickets. We expect 500,000 to 1 million(/8 hours) tickets sold a day. > Each records should be 100 bytes long only. > > And we also need to use SSL+Transaction Support. > > The big question is Can Rails support that amount of traffic? Or I > better consider PHP? > > Best Regards > Chamroeun > -- > Posted viahttp://www.ruby-forum.com/.I recommend checking out Enterprise Rails by one of my former coworkers, Dan Chak: http://www.amazon.com/Enterprise-Rails-Dan-Chak/dp/0596515200 He describes a lot of the work we did at CourseAdvisor to scale our site to handle millions of users. I think Rails has evolved to a point where some of the approaches he describes are not the best, but I think it still contains some very helpful advice and strategies. (I''m not involved with the book in any way so this is not self-promotion). Courtney
Philip Hallstrom
2009-May-28 16:41 UTC
Re: 500,000 to 1million records a day. Can Rails scale to that?
> We are planning to use rails+mysql to develop a website that sells > Lotto > Tickets. We expect 500,000 to 1 million(/8 hours) tickets sold a day. > Each records should be 100 bytes long only. > > And we also need to use SSL+Transaction Support. > > The big question is Can Rails support that amount of traffic? Or I > better consider PHP?I realize I''m about to open a can of worms, but I''d be more concerned about mysql than I would about rails. InnoDB and all that sort of stuff being set up properly to handle the number of inserts, etc... you''d have the same issue with PHP...
Frederick Cheung
2009-May-28 17:03 UTC
Re: 500,000 to 1million records a day. Can Rails scale to that?
On May 28, 5:41 pm, Philip Hallstrom <phi...-LSG90OXdqQE@public.gmane.org> wrote:> > We are planning to use rails+mysql to develop a website that sells > > Lotto > > Tickets. We expect 500,000 to 1 million(/8 hours) tickets sold a day. > > Each records should be 100 bytes long only. > > > And we also need to use SSL+Transaction Support. > > > The big question is Can Rails support that amount of traffic? Or I > > better consider PHP? > > I realize I''m about to open a can of worms, but I''d be more concerned > about mysql than I would about rails. InnoDB and all that sort of > stuff being set up properly to handle the number of inserts, etc... > you''d have the same issue with PHP...Yeah, worry about the database. If your ruby (or php or java etc.) code is the bottleneck, just get more frontends and reconfigure the load balancer, if the db is what''s limiting you then things are harder. Fred
Marnen Laibow-Koser
2009-May-28 17:23 UTC
Re: 500,000 to 1million records a day. Can Rails scale to that?
Philip Hallstrom wrote:> I realize I''m about to open a can of worms, but I''d be more concerned > about mysql than I would about rails. InnoDB and all that sort of > stuff being set up properly to handle the number of inserts, etc... > you''d have the same issue with PHP...I''d agree with you. And it will come as no surprise to those who''ve seen other posts of mine that I''d *strongly* recommend PostgreSQL rather than mySQL. It does a better job at maintaining speed and referential integrity at the same time, and has a whole host of other advantages that will probably make life easier with large datasets. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Rimantas Liubertas
2009-May-28 17:26 UTC
Re: 500,000 to 1million records a day. Can Rails scale to that?
> I''d agree with you. And it will come as no surprise to those who''ve > seen other posts of mine that I''d *strongly* recommend PostgreSQL rather > than mySQL.Or you can use MySQL instead of that mySQL, should work just fine. Regards, Rimantas -- http://rimantas.com/
Chamroeun Sok
2009-May-31 04:16 UTC
Re: 500,000 to 1million records a day. Can Rails scale to that?
I got 1 good advice from a Rails Guru. I think i''ll just get it up and think about scaling later on. MOstly, Database is the biggest bottleneck. Yes, i read Enterprise Rails. And some good advice from Some Big sites that use Rails. i''ll just keep Rails and move on... God Bless me Best Regards Chamreoun Courtney Wade wrote:> On May 28, 4:43�am, Chamroeun Sok <rails-mailing-l...@andreas-s.net> > wrote: >> >> Best Regards >> Chamroeun >> -- >> Posted viahttp://www.ruby-forum.com/. > > I recommend checking out Enterprise Rails by one of my former > coworkers, Dan Chak: > http://www.amazon.com/Enterprise-Rails-Dan-Chak/dp/0596515200 > > He describes a lot of the work we did at CourseAdvisor to scale our > site to handle millions of users. I think Rails has evolved to a point > where some of the approaches he describes are not the best, but I > think it still contains some very helpful advice and strategies. (I''m > not involved with the book in any way so this is not self-promotion). > > Courtney-- Posted via http://www.ruby-forum.com/.