Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

171–180 of 264 posts

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

#171

can we not use unreadable fonts on websites? I read the top item as 6g aka 6,000 and the next (aws) as $60 and they were like "we can likely cut here".... yo you're spending $6k on the other thing cut there first... reading again yeah true.

Looks very readable to me: https://imgur.com/aWURtju

Are you blocking fonts.gstatic.com? It's loading the font (Raleway) from there.

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

#172
post #167
post #94

Earlier quoted context omitted.

I have a web app that's struggling if there are more than 2 concurrent users per CPU core. It's displaying incompressible large resolution images with EDIT: not sure why I'm downvoted, I'm just presenting my use case. They are multigigabyte images encoded with custom wavelet compression that are cut into tiles (think google earth), each user needs 5-10 tiles every second

My guess would be that your webapp is serving images in a blocking fashion, meaning every time a use requests an image it will fetch the image for the user AND block the http serving thread until the image is uploaded. Can you provide more context (eg: tech stack)?

What's blocking is number of http connections between browser and server. Most browsers only allow 6, each tile takes about 100ms so getting 10 in under second doesn't always happen.

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

#173
Back in 2009-2013 or so I ran a quite popular add-on for World of Warcraft which aggregated data from about 200k active users regularly uploading it, maybe 5GB per day, into a common database of 5-10MB that was then downloaded by about 1 million users in varying intervals back into the game (it was some sort of mapping database, telling you where in the world which NPC was, with that info gathered by users using the tool). It came to eat several terabytes of monthly traffic, which was huge back in those days, but I operated that infrastructure by myself for several years on a single dedicated server for about 50€ responsible for the data aggregation work (heavy on I/O and computation) and two virtual server instances for about 15€ each which basically only served the downloads. The included traffic package on those VPSes was large, actually I chose the VPS offering precisely for that reason because I could economically cover all the download traffic that way. The compute power on them sucked, but they were basically a simple CDN setup so that didn't matter much. The total was about 70€, off course domain etc. need to be added, but I never paid more than 100€ for hosting of that app.

It is really disconcerting to see that doing similar "do-it-yourself" hosting activities nowadays appear to cost twice as much (judging by the article) while the "raw msterials" - core backbone traffic, compute power, memory and storage - all have gotten waaaaay cheaper in the last decade. Too many new rent-seeking middlemen, I guess...

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

#174
I hate such titles with a passion. I wonder if people will ever realize that "X monthly users" means absolutely nothing. That's by far the most useless metric people have come up with. This is the exact equivalent of "costs of living healthy":

1. How do you define "healthy". 2. Genetic abilities. 3. Overall health. 4. Eating habits. 5. Your geographical location. 6. Your daily routine ..... X^60000. {Factor number X^60000}

There are an infinite amount of buttons and dials that will determine how much "X monthly users" will set you back. Back in 2011 I used to own a blog that had something along the lines of 25k daily visitors. My annual bill was less than 100 bucks, domain included. And keep in mind that this was way before AWS, GCP and Azure came into the picture and costs were much higher than they are now. But I had spent months investigating the cheapest and most efficient ways to cut down costs. And it's the same with cloud providers - they can be brutally expensive or dirt cheap for the exact same thing if you don't take your time to see which and what is the best solution for your use case.

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

#175
post #50

Earlier quoted context omitted.

I beg to differ. In my experience, the complicated setups that are justified by the argument of "reliability" have more downtime then a single VPS. The reason is probably that there are more moving parts and more has to be maintained / can go wrong. These days, a single VPS in the right datacenter has excellent uptime.

> I beg to differ. > In my experience, the complicated setups that are justified by the argument of "reliability" have more downtime then a single VPS. The reason is probably that there are more moving parts and more has to be maintained / can go wrong. > These days, a single VPS in the right datacenter has excellent uptime. Again, maybe in your experience but that's not universal. There's literally no redundancy wit…

If Digital Ocean is giving you an hour of downtime every two weeks (two 9s and a 7) then they're breaking their SLA (four 9s).

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

#176

Earlier quoted context omitted.

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.

Being well versed in setting up your own database server bereft of cloud provider hand holding easily pays for initial time investment over time. I don't think most understand just how much a mastery of the basics is capable of generating in value when you're essentially vendor lock-in proof. There is so much blindness to voluntary hanging of one's arose out the window created by vendor overreliance.

Yes, without clear leadership, it is easy for a dev team to flounder around in a cloud provider’s offerings.

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

#177
post #172
post #167

Earlier quoted context omitted.

My guess would be that your webapp is serving images in a blocking fashion, meaning every time a use requests an image it will fetch the image for the user AND block the http serving thread until the image is uploaded. Can you provide more context (eg: tech stack)?

What's blocking is number of http connections between browser and server. Most browsers only allow 6, each tile takes about 100ms so getting 10 in under second doesn't always happen.

Have you tried combining the tiles on-the-fly as image sprites?

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Images/...

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

#179
post #154

Earlier quoted context omitted.

> 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?

> staying on topic

A major subtopic of this thread is "different situations call for different setups."

Saying "I won't work with PHP" is like saying "Gluten will make me shit my brains out." It is not virtue signalling.

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

#180

I don’t understand some of the comments quibbling over how this person has a “bloated” stack because it costs more than whatever irrationally frugal setup they’ve created for an app that does X specific thing. Here’s a bigger point: If you’ve got 55,000 monthly active users, and $171 per month doesn’t feel like a rounding error to you, then what you made isn’t actually valuable. Spending any amount of hours to reduce…

You're assuming that the goal is to make something valuable. There are forums with more traffic than this, which don't make money. They're hobby projects.

Making something valuable is not the same as making money. May be you just want to feel that you're doing something good for the community.

However, money is the universal way to measure value. And if you think that you create an enormous value for the community, and it's something that is important to you personally, paying a few hundred bucks a month for it should be a no-brainer.

Post reply on HN