Re: Simultaneous connections

Ezra Zygmuntowicz
Thu, 20 Sep 2007 00:10:43 -0000

On Sep 19, 2007, at 11:33 AM, Dave Smith wrote:

>
> I don''t want to hijack the thread, but I think answers to my
question
> will be just as useful for the OP.
>
> I''m relatively new to this game... can someone explain the
> ramifications
> of this?  When you say "simultaneous connections", what does that
> mean... what is the lifespan of each?  Is it open sessions we''re
> talking
> about? Or just the processing time of a page view?
>
> For example... if a site gets 6000 hits an hour, from 1000 users each
> checking in every 10 minutes, what does that mean in terms of mongrel
> processes?
> --
> Posted via http://www.ruby-forum.com/.


	1000 open connections is much different than 1000req/sec. I host
rails apps that have had up to 17,000 open connections at the load
balancer and still serve traffick fine. 1000req/sec is another beast
and is achievable, but if your expecting that many hits you are going
to have to customize your application for performance.

	As long as you try to keep all of your actions as short as possible
and push out anything that takes more then 1-2 seconds into an
asyncronous work queue you can handle a surprising amount of traffick
on 3-6 mongrels, I''ve seen 6 mongrels do a few million dynamic page
views/day with a properly written app. But if you are really doing
sustained bursts of 1000req/sec then you need to have a badass
caching system in place and only generate dynamic content that you
cannot cache.

	Also if you expect this much load you should gem install swiftiply
and use the evented_mongrel, it''s much more efficient and queueing
requests.

Cheers-
-- Ezra Zygmuntowicz
-- Founder & Ruby Hacker
-- ez-NLltGlunAUd/unjJdyJNww@public.gmane.org
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)