
Costs of running a Python webapp for 55k monthly users - caspii
https://keepthescore.co/blog/posts/costs-of-running-webapp/
======
lacker
It's tough to generalize from things like this because "a webapp for 55k
monthly users" can mean drastically different things. A user could be loading
a few static pages, or that same user could be opening websocket connections
or making requests that require expensive database queries. Your average user
could stick around a minute, or an hour. Different apps can easily have per-
monthly-user infrastructure costs that are two orders of magnitude different.

For comparison at the other end of the scale:

 _Facebook said that in the first quarter it spent $3.7 billion on data
centers, servers, office buildings and network infrastructure._

[https://www.datacenterdynamics.com/en/news/facebook-
signific...](https://www.datacenterdynamics.com/en/news/facebook-
significantly-decreases-infrastructure-spend-defers-3bn-costs/)

That's something like $8 per user per year. If you had that level of
expenditure for your 55k-user app, it would cost $400,000 per year, 200x the
cost given by this blog post. It isn't that Facebook is wasting the vast
majority of their infrastructure, though, it's that the application does a lot
more for each user.

~~~
ramraj07
The Facebook comparison is nowhere close though. Firstly, even purely from a
services perspective, the per user compute needs per person are quite insane
if you take a step back and think about what all has to happen in the
background. Then you have to think about how much each user uses facebook and
instagram, not to mention other services like video calls and live. Further,
Facebook also ostensibly spends a bunch of the resources directly making money
by utilising the resources on their ad biz. And then you have all the research
and prototype work Facebook does. Finally this also includes office buildings
and actual machine expenditure which ostensibly will pay dividends in future
years, plus being a factor that OP didnnot even include in this discussion.
I'm fairly confident that for the same number of requests of compwrable
complexity Facebook spends significantly less than what this person is
spending.

~~~
quietbritishjim
All of this just seems to be agreeing with the parent comment's point that
different websites do different amounts of work per user.

~~~
mannykannot
It does not just agree; it suggests explanations.

I suspect that one particular aspect of Facebook's operations - the nation-
state level of spying on its users and the people they mention - accounts for
a significant part of the difference.

------
TekMol
It always makes my head dizzle when I read and hear how much people manage to
bloat their stack because they think they need to "scale".

I have web applications running that reliably serve 50k users per day and cost
me $10/month, running on a single, cheap VPS.

~~~
threeseed
It always amazes me how people are so free to judge other's situations.

It's great that _your_ web app only costs $10/month but others may have web
apps that are more computationally intensive e.g. video processing or ML
inference etc or simply can't join everything they need at runtime.

And it's great that _you 're_ willing to deny those 50k users a day access to
your service when that cheap VPS inevitably falls over. But others may be
monetising that traffic and will want a HA solution so their revenue isn't
impacted.

All of those add complexity and cost to an architecture.

~~~
maxk42
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". The matter is worsened
by the fact that the application is so simple that it doesn't even support
user accounts. There is room for discussion here about efficiency in
application architecture. More importantly, an article billing itself as
"Costs of running a Python webapp for 55k monthly users" is silly because
there is no way this is representative of anything. I'm afraid new hackers
will be scared by the high costs listed here and be discouraged in their own
efforts.

~~~
fxtentacle
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.

~~~
anang
It doesn’t cost anything to spend 4 hours of your time doing anything, so it
doesn’t really wipe out any savings. Reducing a bill from $400 month to $200
is real money, not some theoretical time/value judgement.

And, as others have mentioned, there is enormous value in knowing how to
operate on a fairly lean tech stack. It makes it so much simpler to scale
effectively while keeping costs down.

~~~
darekkay
This is only true, if you do not value your free time. In your example, you've
spent 4h to save 200$, so your work was worth 50$/hour. A freelancer with a
100$/hour rate might do 2 hours of work instead, spend the money, and gain 2
hours of free time.

There are other factors of course, but in general, many people come up with a
rate for their own free time (which is often higher than the actual rate they
charge clients)

~~~
anang
It’s not only true if you don’t your free time. It’s only true if you’re a
freelancer that is turning down hours at a higher rate than what you’re
saving.

Many people working on products, both on their own and within a company,
aren’t turning down other profitable work to optimize existing solutions.

If I watch a two hour movie instead of spending two hours saving $100/month,
it doesn’t matter how much I value my time, no one is paying me $100/hour to
watch a movie.

~~~
darekkay
There's a difference between the initial example and watching a movie. That's
what I summed up with "there are other factors (than money)". If I'm only
interested in the _outcome_ and I treat the way to achieve it as work, I
definitely weight the time cost vs benefit (and I am not a freelancer). If it
is something I enjoy doing (which may or may not be true for the initial
example), I'll take this into account as well. Time is a limited resource, and
I treat it as such.

------
pembrook
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 that already small number is a giant
waste of time for anybody who has that level of traction.

~~~
benhurmarcel
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.

~~~
golergka
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.

~~~
ClumsyPilot
You mean like how repairing roads should be a no brainer, but no-one wants to
pay for it?

~~~
golergka
Even here in Russia, which is famous for its awful roads, there's plenty of
private roads, both closed to public, and operated for-profit with toll booths
that are in great condition. Tragedy of the commons doesn't happen when things
actually belong to someone.

~~~
ClumsyPilot
If I had a penny for every time people write blanket statements of this
nature, id be a wealthy man.

The list of privatised institutions that perform worse than their publically
owned equivalents nations is very long.

Passenger rail in US and UK is privately owned and terrible compared to French
and Spanish. US broadband is quite poor. US healthcare is much worse value.
Private prisons - I dont even know what they were thinking.

One must carefully access if market-based solution for a given problem is
suitable, or if the potential for abuse and natural monopoly just too great.

~~~
valuearb
Amtrak is owned by the US government.

US broadband is run by local monopolies established by government action.

US Healthcare is heavily regulated, and grew massively expensive only after
regulations were added, and preconditions were excluded.

All US prisons have problems.

You have any real examples?

~~~
ClumsyPilot
> Amtrak is owned by the US government.

Irrelevant. The actual railroads are private, and Amtrak gets shafted. Look at
the state of US passenger railways, and compare them to trains in France or
Spain. All countries with successful passenger rail have them public.

You will find find same pattern for all examples given.

~~~
valuearb
So your only example of the ills of privatization, is a company that wasn’t
ever really privatized?

~~~
ClumsyPilot
I can't help you if you intentionally misconstrue everything I write.

If you wish to continue believing that privatisation can never have negative
results, please do. But even a casual reading of history or economics will
demonstrate that's wrong.

~~~
valuearb
I’ve done far more than a casual reading of economics, and since you can’t
provide a single example of the ills of privatization I suspect your reading
barely reached casual levels.

~~~
ClumsyPilot
If you are going to taunt me, put in some effort and bring something to the
table. Present your point of view and contribute to the conversation instead
of just criticising and nitpicking.

You are just asking me to google things for you.

With your great knowledge of economics I am sure you can summarise the history
of privatisation far better than I ever could, so please share your wisdom
with us.

~~~
valuearb
You made your claims, I clearly debunked them. I decline to spend my time to
continue your free education any further, unless you put the effort in.

~~~
ClumsyPilot
You demonstrate hypocrisy and blatant disrespect for your interlocutor.

Your 'debubking' is low-effort critisism. You've contributed nothing factual
or informative. You don't even bother making claims, or aswering any of my
direct questions.

~~~
valuearb
You claimed Amtrak is an example of the ills of privatization, when it’s owned
by the federal government. And attributed the effects of strong government
regulation in the healthcare and broadband markets to “privatization”.

My criticism is only low effort because you know so little of the subject that
your world view is built on obvious misinformation.

~~~
ClumsyPilot
Your critisism is so low effort you don't even bother reading - I never
mentioned Amtrak. You did not bother to mention structural differences between
railway networks in France and Uk, to give any example of succesfull private
passenger rail, to deal with my claim that all sucessfull mass transit is
public, to comment on the fact that Uk privatised national rail but they went
bancrupt and the public had to pick up the tab. That despite their 'private'
nature we still provide subsidies and build infrastructure.

Maybe you should be spend less time judging worldview of others and more
contributing something of value to the discussion.

~~~
valuearb
Amtrak is the only significant passenger train service in the US. And you
didn’t mention that air travel is far faster and as cheap as rail travel,
which makes a huge difference in a large country like the US, over dense
little city states like Europe. Air travel is replacing train travel even in
Europe and has for over 70 years.

And privatization isn’t a guarantee against bankruptcy, which is a useful part
of the free market. The UK rail was bankrupt as a public entity, forcing
taxpayers to pay the bill. privatization successfully increased ridership and
customer service. And it’s still privatized, Railtrak was only one of the
group of companies created from privatization.

So again, do you have any real example that shows privatization doesn’t work?

~~~
ClumsyPilot
You have gone from claim that Amtrak is public, then private, then back and
forth again. You seem to think this half-assed service proves any point you
want to make whenever convenient.

"you didn’t mention that air travel is far faster"? - Ow Really?

You've done nothing to address the question I've asked three times - show me
privately owned railway or mass transit that performs as well, as the rail
network in France or Spain. I am done here, please troll elsewhere.

------
nickjj
I'm confused about their thought process on their $95 a month DO servers.

They mention using a blue-green deployment strategy and a managed database
service. That implies their web servers are stateless, or at least stateless
enough to switch between the servers seamlessly.

But then they go on to say they don't want to downgrade because it means
provisioning new servers.

Even in the worst case scenario of not using configuration management tools,
aren't we talking a few hours of work here to save yourself let's say $40 a
month which is 25% of their monthly bill? That would be the cost savings of
downgrading to a lesser server x 2.

With configuration management tools, spinning up a new server would typically
be running 1 or 2 commands and waiting 5 to 10 minutes. That's about how long
it takes me to spin up a new server on DO to run a Flask application using
Ansible and most of that time is because Ansible isn't exactly well known for
its speed to execute tasks.

~~~
mewpmewp2
Or you can spend that few hours writing a blog post for marketing purposes or
figure out how to actually generate revenue.

~~~
srtjstjsj
The blog post earned them a lot of ridicule for poor technical management, and
didn't promote their business.

------
avolcano
Nice writeup! Always appreciate transparency with these sorts of things, as
someone who writes a lot of tiny personal projects and sometimes wonders how
much I'd have to invest if they ever actually gained any traction. Congrats on
having so many users, and good luck on monetization.

For the server instances, I can't imagine 4 CPUs/8 gigs RAM is really needed
24/7, but can imagine it being needed in bursts, and I assume GCP has various
"elastic" auto-scaling products for that. Would love to know if your metrics
indicate that this is the smallest box you could comfortably run on, or if
it's just a best-guess. Could potentially spin down blue-green environments
after some set amount of time (once you know a deploy "succeeded"), as well.

For Metabase, I can't find any "system requirements," but I'm not _super_
shocked by the price tag. I've always liked the idea of hosting my own tools
instead of relying on some SaaS's free/trial tiers (particularly for things
like analytics, logging, or metrics), but a lot of the open source options out
there assume you have a pretty hefty box to throw it at. At the same time, I
haven't found any better alternative other than just doing ad-hoc analyzing in
SQL (using a GUI like Postico).

~~~
caspii
Thanks for the compliments!

Yes, the server instances are definitely too large. I was previously running
on 2 instances that were half the size and ran into some problems which I
thought I could fix by increasing specs. Turns out the problems were not
related to specs and now I'm stuck with the instance size (on DigitalOcean you
can only up-size not down-size)

I use Postico too, but don't have enough SQL chops to get the answers I need.

~~~
dan1234
You’re already using blue/green for deployments, so why not:

* replace the currently inactive server with a smaller instance

* swap to the new instance and test the load

* replace the second server

For such a small app I’d drop the blue/green (most deploys will likely only
take a few seconds?) and host Postgres on the same server.

Also, I’d move metabase onto a DO instance.

Any reason you’re using DNSSimple over a cheaper provider (or free in the case
of DO)?

~~~
gravitas
These are all my suggestions, I would also add look for ways to spread out
tasks to other smaller VMs - the general pricing is +$5 "per" ($5 per +1 vCPU,
$5 per +2G vRAM), a $5/$10 webserver only handle static asset delivery, then
apps on middle tier app servers at $15/$20 would give better fault tolerance
and spread out the load and still keep blue/green.

------
listenallyall
It's disappointing (and expensive) that you have no caching strategy. I would
bet that 99% of your scoreboards are updated very infrequently, these pages
could be re-generated into static html pages via cron job every 30 minutes / 2
hours / once per day, whatever frequency you choose. It's a free service, make
people pay to have real-time updates.

My gosh, you are polling each leaderboard for changes _every 15 seconds_.
Again, I would bet perhaps 1 in 1000 mature boards (i.e. online for more than
a day) change in any 15 second period. You could severely reduce your server
load by utilizing a CDN and statically-generating any board which hasn't
changed in say, the past 6 hours.

------
Slartie
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...

------
senko
> 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.

Too late for them, but if you find yourself similarly needing to increase the
capacity to solve a produciton issue on DO: you can upgrade CPU/RAM without
increasing disk size. This allows you to downgrade later if you end up over-
provisioning.

------
nbadg
> The webapp runs on two identical DigitalOcean servers... The database is a
> hosted Postgres instance also on DigitalOcean.

They're only spending $69/mo total at DigitalOcean, and it sounds like their
scaling isn't limited by computational power but rather by operational
concerns. So, I'm not entirely sure what the backend language has to do with
the costs here.

If you're trying to draw a cost comparison between languages, then the take-
home from this writeup is that 55k monthly users is small enough that the
backend language doesn't make a difference in costs.

Side note, this kind of transparency is always really nice to see!

~~~
moksly
I think this article is frankly PR to get their users to generate revenue. It
has nothing to do with the cost of hosting a python webapp.

I mean, why are you even doing analytics if you’re not generating revenue?

------
ramraj07
This is not clear at all - 55k monthly users means nothing, what's the average
number of requests per second? 99th percentile? What's the same stats for CPU
and memory usage? 3.4k users per day is actually not that large a number, even
assuming each user is going to bombard your server with thousands of requests
in 20 minutes, it's well within what optimised flask with wsgi can handle with
a very mediocre compute instance.

Further,Are you absolutely sure that you have optimised your configuration and
code for performance without changing the stack? (Serving static components
directly via ngninx, caching responses using flask, caching other resources
using memcached, optimizing gunicorn worker counts for the instance type,
profiling which endpoints take the most amount of time and trying to optimize
them, see if the bottleneck is webserver or the db, considering pypy, and
probably 50 other ideas).

Are you also absolutely sure that bluegreen deployments are what you want to
use given your cost constraint? Further, if you have bluegreen it should be
straightforward to downgrade your instances to smaller ones fairly easily,why
not do that first before discussing costs?

We run production webservers on t2.small ec2 instances in elastic beanstalk
and (with some assumptions) handle comparable loads during work hours. We have
two redundant instances and can easily scale up or down even on schedule with
zero extra code. There's not even a need to minimize costs here because our
application costs 100x more on data lake costs than the webservers, but it
really helps keep the engineers grounded and ensuring they don't write
outrageously inefficient code that's covered up by excessive server sizes.

------
christilut
The author says he wants to switch Disqus to Commento but I wouldn't just do
that. I didn't have a great experience with Commento. I like the idea and
mostly the execution of it (including the OAuth) but I found some major bugs
(Firefox just didn't work at the time) and I didn't get any response to
reporting those. I asked a few more questions by mail and also no response.
After that I'm gone pretty quick.

Not that I'm saying you should use Disqus since they have some privacy issues

~~~
mtlynch
Ditto.

I was excited for Commento and signed up for a paid plan. I even contributed
code.[0] The author sent me an onboarding email which included the line,
"please reply to this email (I'm a real person)." I replied with some
questions about the service and billing, but he never responded. Four months
later, nobody has responded to my merge request, either.

I canceled my service at the end of the month.

[0]
[https://gitlab.com/commento/docs/-/merge_requests/41](https://gitlab.com/commento/docs/-/merge_requests/41)

------
aikah
Nice, we need more of these "real world expenses" posts on HN. I wonder how
much it would cost to run the same app powered with Java. More? or Less?

~~~
jillesvangurp
We use Google cloud run for this. They bill per request and you can run
whatever docker container you want. I currently have a small setup with two
separate kotlin based server applications running there (one based on spring
boot and one on ktor). We use firestore as a cheap datbase (billed per read &
write). Both have a free tier. So it's costing us next to nothing currently
because neither docker container is getting a lot of traffic. Basically the
bill for last month was only around 2$ for one of these applications (the
other one I only deployed a few days ago).

Basically, at some point it gets expensive of course but when you are simply
testing out stuff and don't expect a lot of users to show up, it's actually
not bad.

~~~
asadawadia
how does the kotlin server perform on cloud run? is the startup time slow?
does spring take a lot of memeory etc?

~~~
jillesvangurp
I bumped the memory limit from 256MB to 1GB. 2GB is the maximum on cloudrun.
You pay a combination of CPU/Memory per request obviously. Beyond that, it
scales by firing up more containers as your request load increases to a
default maximum of 1000 (we set it at 2).

Obviously don't use this if you have a lot of cpu/memory requirements but
otherwise this should be fine for a well crafted stateless server.

Startup is fine with both ktor and spring-boot but obviously takes a bit of
time. I noticed there's startup overhead if your container gets shut down
because there is no traffic. In that case, it takes around 30 seconds for the
first request to go through. That includes everything from booting the
container and then starting the process. I imagine simply pinging the server
regularly should keep it running. Alternatively, you can configure a minimum
amount of servers.

------
isatty
$30 dedicated from Hetzner can do this reliably enough for a non revenue
generating blog, including blue green deploys, postgres, certs, cache, edge
caches (Cloudflare I guess) and even Metabase (which admittedly can be a
memory hog if you don't set it in the JVM).

~~~
kjaftaedi
I put some VMs in Hetzner for a project I was working on, and found out you
get what you pay for.

They mistakenly deleted all of my virtual machines and all of my backups.

If you host anything with them, or anyone I guess for that matter, make sure
you have your backups hosted somewhere else.

~~~
thatwasunusual
Did they ever give you an explanation? I've used Hetzner for 6-7-ish years,
and _never_ had any problems with them. I have mostly used their dedicated
servers service, though.

~~~
kjaftaedi
Their security team was concerned that I was impersonating myself.

They sent me a boilerplate e-mail that there was a problem with my account and
to contact them to resolve it. I called them within 10 minutes, and they told
me 'your account doesn't exist'

They restored my 'account' which means i had a user with the same login and
password, but all of the assets to the account were tossed to the wind.

I can only guess that someone jumped the gun, (assuming they had an internal
process at all).

------
achairapart
I'm not familiar with Python as a web stack but to me it looks that the DO
instances are a bit over-scaled for 55k monthly users.

But what caught my eye was DNS Hosting: 5$/Month? Maybe it's a typo, shouldn't
be more like 10$ per year to host a domain and its DNS?

Anyway, thanks for sharing, very interesting.

~~~
stevekemp
I charge £1/zone/month for DNS-hosting, and while most of my clients only have
a single zone there are people with 50+

DNS hosting can be cheap (free if you use cloudflare, etc), or very expensive.
My prices give me a 50% margin over the raw AWS Route53 costs, but the appeal
is that I store records under revision control and let you make changes using
git:

[https://dns-api.com/](https://dns-api.com/)

~~~
ing33k
interesting .. is the price flat even If there are lookups in billions ?

~~~
stevekemp
Yes.

AWS charges you a flat-fee per zone, and then additional-fees based on volume
of queries. In my case I don't host any domains that go over the threshold
where it is billed for - but if I did those costs would be offset by the
profit of the other low-volume zones.

------
PeterStuer
First of all kudos for putting something out there.

That said, are you making the right tradeoffs? Most of your spend is going to
'luxury'. Dual overcapacitated deployments, hosted managed Postgress, hosted
Metabase.

It does sound like you could _very_ significantly reduce your spend almost
instantly with just a few minor changes, and dramatically if you would do a
rethink of your stack.

------
donpark
Cost of servers and DB don't match DO's current pricing.

4 vCPUs, 8GB RAM, 80GB disk costs $40/month now so two servers alone cost $80
which is higher than $69.

Either DO raised pricing or they got some special discount.

~~~
danieldk
Also, pricing of Digital Ocean seem to be quite steep for larger machines.
E.g., Hetzner offers AMD Ryzen 3600 dedicated servers with 64GB RAM and 2x
512GB SSD for 42.16 per month including VAT.

Or if you really insist on a VPS, you can get the same configuration with
double the disk space at Hetzner for 15.38 per month at Hetzner.

I have a Hetzner VPS and it has been rock-solid.

(I know that they are in Europe, but I assume that there are similarly-priced
competitive US counterparts.)

------
dddw
5 bucks a month for dns hosting is also quite expensive since most domain
hosting offer them for free. Definitely look into autoscaling with AWS for a
simple 'poor man's cluster'

~~~
banana_giraffe
That caught my eye too. Not only that, the service being used here charges
more for wildcard LetsEncrypt certs somehow.

I'm very confused what the value add is for this service.

------
samcrawford
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.

------
kumarvvr
I wonder how much it would cost for the same app, if developed in Java or
dotnet core.

They could save a good chunk of the 69 USD they spend on Digital Ocean
servers.

edit : To clarify, What I meant was that to serve 55k users, perhaps using
more efficient languages like C# or Java, would allow them to run on lesser
spec machines. And as those users scale up, to say a million users a month,
perhaps savings would also increase, if using more performant languages.

~~~
altdatathrow
The language has nothing to do with it, this site could be ran on a $5/mo
droplet (or a pair of them for their deployment strategy).

~~~
kumarvvr
Wouldn't the same app, written in Python & C#, have different throughput on
the same hardware?

~~~
throwawaythekey
Yes, but a python app can be efficient enough to serve that many users on the
smallest size droplet. Any additional speed gains would only be useful for
scaling and MAYBE latency.

~~~
kumarvvr
So you agree that throughput would be different. Sure, a Python app can be
efficient to serve 55k users.

But scaling it to a million users, say. A python app would consume way more
resources than an app in C#

~~~
throwawaythekey
I don't think any would argue that python is the fastest language. The more
pertinent/practical point for most though is not to needlessly overbuild
whether it be in dev time or servers.

Realistically, the author could probably serve 10x-100x more users (your
million users) and still stay on the cheapest droplet with python. As you
can't go smaller than the smallest, changing language can't be justified on a
cost basis.

Finally, the performance differences between a well written python app and a
poorly written c# app are probably not that large. The developer probably
started with python, because that's what they know, and wouldn't be able to
match the code quality in c# without significant effort.

------
axegon_
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.

------
marsdepinski
During the dotcom days, we hosted sites like this on a home dsl connection on
a single desktop machine and got people to pay for that.

~~~
ianhowson
Hey, I still do this today for non-revenue-generating services.

Pretty much every bigcorp I've ever worked for has some crucial service on a
box under someone's desk...

------
winrid
These are fun to read, but the data is hard to use for anything unless you are
building the exact same thing.

(plug) Regarding Disqus, I run a competitor which you might like:
[https://FastComments.com](https://FastComments.com)

------
hgo
I believe that most of the comments complaining about overspecing the runtime
mentioned in this article (if at all, I find it reasonable), are extrapolating
on their experience and referring to a general problem of overspecing in the
industry.

1\. Whenever I see a new company's/project's runtime, I have come to expect a
massively overcomplicated system that is "built to scale". But ends up costing
a lot and taking way too much time from product-development. A real issue with
this is that when looking at the project's feasibility to actually do scale,
the runtime-cost will be estimated to a multiple of the current runtime cost
which will appear larger than if the systems were built to handle the current
load.

2\. To me, this seems like a failure of cloud computing, which has a very
compelling promise of letting you start with small servers, then easily switch
up to bigger servers when needed. This was, in fact, hard before cloud.

3\. The biggest issue I have with overspeced and overly complex deployments,
is that to me it appears like (novice) developers is led to believe that they
have to do the job in a complicated way. Look at a typical tutorial from the
big and trend-setting players how something should be deployed. The first hit
on my favourite search engine for a "Hashicorp Vault deployment" [1]
recommends using nine hosts. I know from experience that it runs fine on ONE
host of the smallest kind I could find for our non-trivial use-case. Also, in
that use-case it doesn't matter that it is not HA, because it has turned out
to be more stable than any of our other stuff, and can be restarted in a less
than a minute. (I wouldn't mind at all, if the actual motivation for a large
deployment was: "it is fun this way" or "we do this for our own training and
experience" or "we choose to do it this way because of specific requirements"
or anything of the sort.)

4\. It seems to me that, what is needed is enough experience and courage to
say: let's do our deployment and setup in a simple way that will work, because
we know that we are competent to solve scale issues when they appear and we
are not building ourselves into a corner. Also, we can afford to take
responsibility if scaling problems do occur because we did not follow industry
"recommendations" (i.e. trends).

[1] [https://learn.hashicorp.com/tutorials/vault/deployment-
guide](https://learn.hashicorp.com/tutorials/vault/deployment-guide)

Edit: \- clarified HA needs in point 3

------
gbru
OP, it looks like you can save some money on metabase, one of your larger
expenses, if you are able to move to render.com (whom I have no affiliation,
but am a customer). They have a metabase add on:
[https://render.com/docs/deploy-metabase](https://render.com/docs/deploy-
metabase)

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

------
tryauuum
Why does the author want to migrate to google cloud? Simply to be closer to
their firebase installation?

------
WrtCdEvrydy
I've grown fond of Caprover for this kind of small project. I would probably
shove the metabase instance and both of the production instances into a single
smaller instance (but I have been known to increase swap and put off upsizing
resources in the past because cheapskate)

~~~
cf_
Can fully agree with this. Caprover has been a joy and makes it easy to run a
small scale setup where you can deploy those service dependencies easily
yourself without paying for a cloud provider for the hosted alternative.

------
donatj
I get 55k unique users to my personal site, per DAY. I’ve got a number of very
popular tools I host for Minecraft and Dev work.

It’s written in PHP/Go/MySQL

I am on a $10 a month Digital Ocean Droplet hosting like 7 other sites as
well, and it’s probably overkill.

------
grogenaut
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.

~~~
aembleton
Looks very readable to me:
[https://imgur.com/aWURtju](https://imgur.com/aWURtju)

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

------
octabond
This is one of the most difficult things to get when building your startup. At
the beginning you have no way of getting accurate costs, and clearly, there's
no one-size-fits-all approach for this.

Its just trial and error

------
cool-RR
"How much does running a webapp in production actually cost? Maybe more than
you think. [...] In total that’s around $145 USD per month."

I thought that was going a really different direction than it ended up going.

~~~
mosselman
Care to elaborate?

------
ponytech
The FAQ [0] still says it costs 15 EUR per month, you should update it.

[0] [https://keepthescore.co/about/](https://keepthescore.co/about/)

------
dusted
Running my websites costs whatever electricity my server takes, but it also
serves me as a filestorage so it'd be on anyway, so I'm going for "the price
of the domains"

------
Neil44
Almost half of that is an EC2 instance to run a reporting tool. 5$ DO instead?
Also, 5$ a month for DNS hosting when DO will do that for free?

------
julienb_sea
The webservers seem very overpowered for 55k monthly... seems like an
unnecessary amount of money and could run on much cheaper VMs.

------
grumple
Majority of HN seems very heated about $171/month. My company pays 100x that
just for our RDS instance (granted we store a lot of data). If you told me 5
of our users ended up costing us 10k/month in operational costs, I wouldn’t
even blink.

55k users is very valuable. If you make a single cent per user per month,
you’re in the black operationally (not counting dev time). If you make that
into a dollar, you get to quit your job and be upper-middle class
indefinitely.

------
freecodyx
The cost this month will be higher, YC hug

------
clashmeifyoucan
One thing I do not understand—what is the point of paying for DNS instead of
using Cloudflare or similar?

------
godzillabrennus
I have seen a web app for 1,000 monthly users spend $1000/month for it.

Those were all paid users and the company was profitable with over 70% net
margins after all costs including labor and research were factored in.

I’m all for $5/month digital ocean hosting when it makes sense but you also
need to be realistic if there are revenues. Hosting should not be a major cost
for the business.

~~~
galacticdessert
And most of the time isn't, right? I have seen project managers keeping a
whole development team of 10+ developers busy for entire sprints to "cut down
the infra costs", without realizing that the dev team costs 500+ kEUR/quarter,
while the hosting costs were something like 7/8 kEUR/month.

Also, related aritcle -> [https://m.signalvnoise.com/only-15-of-the-basecamp-
operation...](https://m.signalvnoise.com/only-15-of-the-basecamp-operations-
budget-is-spent-on-ruby/)

------
Havoc
That seems like quite an expensive mix. Almost a third of the bill goes
towards insights?

------
young_unixer
Looking forward to the monetization post.

Has the developer thought about using donations instead of ads?

------
maallooc
Cost of running it myself on my $30/mo colocation server: $30

oh yeah, and 10$ a year domain fee

~~~
stkdump
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.

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

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

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

------
viro
$5 a month for DNS?! I MUST be missing something. Why the hell would you need
to pay monthly for dns?

Edit: Guys if you down vote at least let me know what I'm clearly missing...
Does dnsimple do something google domains can't?

------
pryelluw
Does it generate revenue?

