By samir817891
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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Managing 5,000 unique users per month with a Django + Nginx + MySQL stack can be handled efficiently with the following key optimizations:
.select_related() and .prefetch_related() to minimize the number of database queries.mysqlclient with connection pooling to reduce overhead when managing database connections.Cache-Control headers.uWSGI or gunicorn.gunicorn or uWSGI as your WSGI server, which helps with concurrency and can handle multiple requests in parallel.NewRelic, Prometheus, or Django’s debug_toolbar to monitor and profile your application’s performance.Use a CDN like Cloudflare to offload the serving of static and media files, reducing the load on your Nginx server and improving global content delivery times.
max_connections in your MySQL configuration to meet your traffic needs.By applying these strategies, you should be able to manage 5,000 users efficiently without any significant performance bottlenecks. Let me know if you’d like guidance on any specific implementation steps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.