Forum: Ruby on Rails 500,000 to 1million records a day. Can Rails scale to that?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chamroeun S. (Guest)
on 2009-05-28 12:43
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
Roderick v. (Guest)
on 2009-05-28 15:35
Chamroeun S. 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
Courtney Wade (Guest)
on 2009-05-28 19:10
(Received via mailing list)
On May 28, 4:43 am, Chamroeun S. <removed_email_address@domain.invalid>
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...

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 H. (Guest)
on 2009-05-28 20:41
(Received via mailing list)
> 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 C. (Guest)
on 2009-05-28 21:04
(Received via mailing list)
On May 28, 5:41 pm, Philip H. <removed_email_address@domain.invalid> 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...

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 L. (Guest)
on 2009-05-28 21:23
Philip H. 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
removed_email_address@domain.invalid
Rimantas L. (Guest)
on 2009-05-28 21:27
(Received via mailing list)
> 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 S. (Guest)
on 2009-05-31 08:16
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 S. <removed_email_address@domain.invalid>
> 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...
>
> 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
Chamroeun S. (Guest)
on 2009-05-31 08:18
Thanks for all the great advices and ideas from you all
This topic is locked and can not be replied to.