Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

151–160 of 264 posts

Re: Costs of running a Python webapp for 55k monthly users

#151

Earlier quoted context omitted.

Don't do blue-green deploys when you have no revenue. Downtime costs you nothing and at 3,400 visitors a day you'll be lucky to drop a single request while deploying. Pre-compute and cache to reduce your need for beefy servers. When you can run something on your machine or in the cloud, choose your machine. EDIT: It's less about saving money and more about not spending it. EDIT2: Forgot to mention: use SQLite.

Caching is, in general, a good thing. But it's worth thinking about how you do it. I recently sped up a large system by dropping the use of redis entirely - because it was being badly used. During a single request there might be 50+ cache-lookups, each taking a round-trip to a remote redis server to fetch a single key at a time. Batching those up to a set/hash would have been more efficient, but the codebase had evol…

Couldn't you have cached locally using something like ehcache?

Re: Costs of running a Python webapp for 55k monthly users

#153
I note the author said: "Note: the servers are oversized for the load we’re currently seeing. The reason for that is that we tried to solve a production issue by increasing the server specs. It didn’t solve the problem, and now we can’t down-size the servers without re-provisioning them"

One small advantage I've noticed with Linode over DigitalOcean is that you _can_ perform these down-sizing actions (without some messy rsync scripts or snapshot-and-recreate approach that DigitalOcean suggest). You first need to resize the disk down to the lower Linode's limits, and then you can down-size to a smaller instance.

Re: Costs of running a Python webapp for 55k monthly users

#154
post #24

Earlier quoted context omitted.

Ok, here is a quick tutorial: Step 1: Copy Peter Levels stack: https://www.nocsdegree.com/pieter-levels-learn-coding/ If he serves hundreds of thousands of monthly users and makes a million a month with a single VPS, you certainly won't have scaling issues when you start out or just have tens of thousands of users. Step 2: If you really scale beyond that, resist the urge to bloat your stack. Think long and hard about…

> PHP (He doesn't use any frameworks like Laravel) I wouldn't want to read (or write) that code, but thanks for the article.

Well, aren't you special. How about staying on topic and not dropping in this, what, developer virtue signaling?

Re: Costs of running a Python webapp for 55k monthly users

#155
post #83

Earlier quoted context omitted.

What does excellent uptime mean in your book? Something like less then an hour of downtime per year. Over the last years, across multiple datacenters, I have seen maybe one or two short downtimes per year. None ever lasting more then 5 minutes.

https://aws.amazon.com/message/41926/ this lasted hours and affected almost everyone using us-east-1, large portion of internet was unavailable because they had no multi-region setups.

That was a "S3 Service Disruption". A perfect example of a problem you do not have with a single VPS setup.

Re: Costs of running a Python webapp for 55k monthly users

#156
post #45

Earlier quoted context omitted.

Contabo VPS: 4 Cores, 8GB RAM for 5€/mo. That should be able to handle the whole thing with plenty of room to scale. Maybe I am old fashioned, but I don't see what all those cloud providers that are so much more expensive bring to the table.

Damn, this seems so cheap. I didn't know about Contabo before. What's your experience with them?

They're great. I've had less downtime with them than DO and I have several VPSs there. I'd highly recommend them.

Re: Costs of running a Python webapp for 55k monthly users

#157
post #82
post #24

Earlier quoted context omitted.

Ok, here is a quick tutorial: Step 1: Copy Peter Levels stack: https://www.nocsdegree.com/pieter-levels-learn-coding/ If he serves hundreds of thousands of monthly users and makes a million a month with a single VPS, you certainly won't have scaling issues when you start out or just have tens of thousands of users. Step 2: If you really scale beyond that, resist the urge to bloat your stack. Think long and hard about…

While this article has steps in the right direction, it's a lot of "use this thing". I operate a simple Flask/PostgreSQL webapp for CS Education through the luxury of my university. If/When I graduate from my program, what are the aspects I can do to minimize my costs for hosting the app? Of course I'll look for best approaches but why does that need to be forbidden knowledge known to a select few? Its an aside, but…

>Literally spending hours trying to figure out how to set things up through hours of Googling doesn't really help that, nor does it promote the "figuring it out" people think it does - its just stumbling upon the right set of commands that let me move past this particular hurdle.

That's basically all of software development for your entire career. Never not had a day or a week not like that.

Re: Costs of running a Python webapp for 55k monthly users

#158
post #156

Earlier quoted context omitted.

Damn, this seems so cheap. I didn't know about Contabo before. What's your experience with them?

They're great. I've had less downtime with them than DO and I have several VPSs there. I'd highly recommend them.

Thanks, gonna check them out when the need arises :)

Re: Costs of running a Python webapp for 55k monthly users

#159
-- QUOTE -- Note: the servers are oversized for the load we’re currently seeing. The reason for that is that we tried to solve a production issue by increasing the server specs. It didn’t solve the problem, and now we can’t down-size the servers without re-provisioning them ️. -- END QUOTE --

Does anyone know the minimal provisions they could potentially use in this case?

Re: Costs of running a Python webapp for 55k monthly users

#160
post #65

Earlier quoted context omitted.

TekMoi is right. I have an Alexa top 6k site which is vastly more complicated (media hosting, load balancing, multiple VMs, DDOS protection, transactional emails, automated backups) which costs $200 / month on AWS. The fact that this person is spending nearly as much to support 50k users a day as I do to support more than 4 million cannot be hand-waived away by "people are so free to judge other's[sic] situations". T…

Both you and TekMoi should probably value your own time higher. The cost savings are great, but once you spend 4 hours on configuring a database server, that'll probably be $200+ worth of your time and, thus, wipe out most of the savings.

>$200+ worth of your time and

Yeah, from your perspective, for others monthly savings of 10$ is allot, and not everyone earns 200$ for 4 hours of work.

Post reply on HN