How many users should a EC2 Micro Instance be able to handle only with a nginx server? How many users should a EC2 Micro Instance be able to handle only with a nginx server? nginx nginx

How many users should a EC2 Micro Instance be able to handle only with a nginx server?


I haven't tried nginx on microinstance for the reasons Jonathan pointed out. If you consume cpu burst you will be throttled very hard and your app will become unusable.

IF you want to follow that path I would recommend:

Try to cap cpu usage for nginx and php5-fpm to make sure you do not go over the thereshold of cpu penalities. I have no ideia what that thereshold is. I believe the main problem with micro instance is to maintain a consistent cpu availability. If you go over the cap you are screwed.

Try to use fastcgi_cache, if possible. You want to hit php5-fpm only if really needed.

Keep in mind that gzipping on the fly will eat alot of cpu. I mean alot of cpu (for a instance that has almost none cpu power). If you can use gzip_static, do it. But I believe you cannot.

As for statistics, you will need to do that yourself. I have statistics for m1.small but none for micro. Start by making nginx serve a static html file with very few kb. Do a siege benchmark mode with 10 concurrent users for 10 minutes and measure. Make sure you are sieging from a stronger machine.

siege -b -c10 -t600s 'http:// private-ip /test.html'

You will probably see the effects of cpu throttle by just doing that! What you want to keep an eye on is the transactions per second and how much throughput can the nginx serve. Keep in mind that m1small max is 35mb/s so m1.micro will be even less.

Then, move to a json response. Try gzipping. See how much concurrent requests per second you can get.

And dont forget to come back here and report your numbers.

Best regards.


Micro instances are unique in that they use a burstable profile. While you may get up two 2 ECU's in terms of performance for a short period of time, after it uses its burstable allotment it will be limited to around 0.1 or 0.2 ECU. Eventually the allotment resets and you can get 2 ECU's again.

Much of this is going to come down to how CPU/Memory heavy your application is. It sounds like you have it pretty well optimized already.