Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

As the title suggested, I need nodejs and mongodb to handle 5000 requests per second. Right off the bat that is. We'll grow to many times that eventually.

My initial thoughts are to put each on separate machines, though I'm not sure if I should start with small machines and prepare to scale out soon, or start with larger machines and scale out later.

Either way I fully expect to eventually scale these two out, but Im wondering what the upscale trigger would be. Would I scale on CPU or memory usage? If on CPU what should I try to keep average CPU usage under?

Oh and yes I will be buying support from 10gen so they can review my document model and ensure that I'm storing data in the most efficient way.

share|improve this question
2  
You set your scale trigger on whatever your bottleneck is, or will likely be. None of us can tell you what that will be - you need to profile your application, do in-depth load testing, and see what shakes out. –  EEAA Sep 28 '11 at 2:35
2  
Also, you say you need "nodejs and mongodb to handle 5000 requests per second". Which one of those gets those requests? Split evenly between the two? That would assume that each node.js request spawns only one mongodb request. –  EEAA Sep 28 '11 at 2:52
    
@ErikA I understand what you're saying about the unknown bottleneck, thanks for that. We have been doing some load testing but have not yet pushed our current architecture to a bottleneck. Generally speaking though what would be a good percentage to keep CPU usage under? –  talentedmrjones Sep 28 '11 at 4:19
    
Oh and both node and mongo will get each request. In some cases 1 node request may in turn incur 2 or 3 mongo requests. But for this particular case, each gets 5000. –  talentedmrjones Sep 28 '11 at 4:22
1  
"Generally speaking", there is no number you should keep your CPU under. If you have a quad-core system and your application is performing well at a load average of 12, then more power to you. You really need to test and determine these things yourself. Much more is reflected in CPU load averages than just what the CPU is doing. –  EEAA Sep 28 '11 at 4:28
show 1 more comment

1 Answer

up vote 3 down vote accepted

"Generally speaking", there is no number you should keep your CPU under. If you have a quad-core system and your application is performing well at a load average of 12, then more power to you. You really need to test and determine these things yourself. Much more is reflected in CPU load averages than just what the CPU is doing.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.