How manage 5000 users uniques month with Django + Nginx + MySQL

July 1, 2015 1.8k views
Scaling Server Optimization Configuration Management DigitalOcean Python MongoDB Nginx NoSQL Django Ubuntu

I have project hosted on DigitalOcean. The users registered, use the site about 4 hours daily. I need calculate the resources for 5000 users registered, considering that the current Droplet is with 1GB RAM, 1 CoreProcessor, 30GBSSD Disk, 2TBTransfer. How I can calculate it?

2 comments
  • A question like that is a lot like asking "how many potatoes can I fit in my trunk". We can get rough estimates, but we would need to know more.

    Have you run a load test against the server to see how many page requests you can fulfill without receiving an error, and while keeping CPU and RAM at reasonable rates?

    First you'll need to know how many simultaneous requests you can make to have it sustain 50% load for 10 minutes. Then 75% for 10 minutes. You can then do some basic math to calculate the required hardware from there. You want it to stay around 50% utilized at most. If it goes past 65%, you'll need to plan to scale up or out.

    Keep in mind that you'll need to take into account that as your site grows, so will the resources consumed. Databases grow as user-base grows. This means more disk and memory consumption, so what works now -- if you're site takes off -- won't work for you in 6 months to a year. Just make sure you build your site so it scales easily.

  • @JonsJava thanks for your reply. What tools do you recommend me?

1 Answer

This question was answered by @JonsJava:

A question like that is a lot like asking "how many potatoes can I fit in my trunk". We can get rough estimates, but we would need to know more.

Have you run a load test against the server to see how many page requests you can fulfill without receiving an error, and while keeping CPU and RAM at reasonable rates?

First you'll need to know how many simultaneous requests you can make to have it sustain 50% load for 10 minutes. Then 75% for 10 minutes. You can then do some basic math to calculate the required hardware from there. You want it to stay around 50% utilized at most. If it goes past 65%, you'll need to plan to scale up or out.

Keep in mind that you'll need to take into account that as your site grows, so will the resources consumed. Databases grow as user-base grows. This means more disk and memory consumption, so what works now -- if you're site takes off -- won't work for you in 6 months to a year. Just make sure you build your site so it scales easily.

View the original comment

Have another answer? Share your knowledge.