3 ms·
Ask HN: Best way to scale a project that may potentially have 10M users?
Hi guys,
I am thinking of starting a very simple service that may have about 10 million users.
I am thinking of using a hosted database like MongoDB's Atlas, Firebase, or cloud flare's KV. So I am not so worried about the database part.
What I am worried about is the application logic that I intend to write in flask and purely python.
How do I make sure that the application can support 10 million users, without going down? Scaling down & scaling up server resources according to usage.
What approach would be best for a solo dev? i.e least complex & easiest to manage, not necessarily the cheapest or more effective way.
My only experience of running a software service is having less than a dozen users for some finance company on a $3 per month Amazon Light Sail. I don't have any experience on building a service with serious numbers of users.
- meiraleal 3y agoFirst you need to scale to 1,000 users, then you will know how to scale to 10,000 (or maybe not). Other than that it is just daydreaming.
- alex_lav 3y ago> I am thinking of starting a very simple service that may have about 10 million users. Until it actually has 10 million users, it doesn't and almost certainly won't have 10 million users. Very very respectfully, if you're asking this question here, you probably aren't equipped to run a service that successful anyway. Either out of technical inability or available cash.
- max_ 3y agoThanks for the insight. I actually know exactly how I am going to acquire those 10m users. So it's not like I am making a wild guess. But you haven't really answered my question.
- meiraleal 3y agoIf you were really capable of acquiring 10m users you wouldn't be clueless about scaling to 10m users.
- alex_lav 3y ago> So it's not like I am making a wild guess. Until you acquire 10m users, you are indeed making a wild guess. Respectfully.
- al2o3cr 3y agoI actually know exactly how I am going to acquire those 10m users. LOL good luck with that. At that scale, the technology stack is the least of your worries. That billing issue that affects 0.01% of customers? At 10M users, that's 1000 instances of the problem!
- deleted 3y ago[deleted]
- 8organicbits 3y agoIf your application servers are stateless, you'll scale those horizontally. Look into application load balancers and auto scaling groups. > best for a solo dev Which frameworks have you used before? Most have a scaling story. We'll also need to know what kind of app you're building. A mobile game, financial platform, developer tool, all have significantly different needs. Also, agreed with alex_lav, you've got a lot to do before you actually have 10M users. Don't hyper focus on scale.
- max_ 3y agoThanks very much for your reply. What Cloud would you build such a service on? AWS, GCP? Another? Any particular product you can think of? Most of my experience is in Flask. I have used Django, Express, Phoenix & Actix for simple exercises but not for something real in the wild. I will be serving static HTML pages with very little write operations. Most of the operations will be reads from the hosted database.
- 8organicbits 3y agoUse a CDN for the HTML and other static assets, that will drastically reduce load on the app server. Flask can scale to 10M users if you use a load balancer, so you can build with that. Every cloud provider can scale to 10M users, so your options are open. Read heavy workloads can work well with SQL, consider using read-replicas to scale that if/when you need it. Consider load testing if your worried about scale. You may find lower costs if you use a language other than python or use async python. You may be faster to market if you build with tools you know well. There's not enough info about the project to make recommendations.
- pestatije 3y ago> for a solo dev imagine 1 in one thousand users has an issue and contacts support(you, since you are a solo dev), how are you going to effectively support those 10k requests?
- max_ 3y agoIf the issue does appear. I will hire more people. But I am talking about having a service that will scale properly for 10m users.