6
20 Comments

Estimating server costs

Hi fellow developers

Every time I think of making a SaaS, even if it is free I end up just thinking about how much the servers will cost, and I have no ideia how to calculate this. Can you share how you do the math and any other tips in that regard that you might have?

Thanks!

  1. 6

    I think @JonathanOron hit a lot of key points but I'll give you a little bit of my anecdotal experience as well:

    It really depends on what your technology needs are, but if you can go the Serverless model, you can do it for dirt cheap.

    I run 4 different SaaS sites that are built this way, and have built several of these apps for clients as well. These are primarily built as static React apps and are hosted in an S3 Bucket with CloudFront providing SSL. APIs are mostly CRUD functionality, built with Node and GraphQL and hosted as an AWS Lambda with an API Gateway in front. Database options at AWS are actually the most expensive part of most app frameworks so I use MongoDB Atlas; one of the lower tiered options is usually enough for me. CI is done with GitHub Actions. All of this costs me about $20/month for each stack.

    That said, one of the apps on this style stack that I built for a client does a lot of data processing and they easily spend $2,000/month on RDS for Postgres instances, so, like I said, it really depends on your needs.

    As a more general response, if you go the AWS route just use the AWS Pricing Calculator: https://calculator.aws/.

    There are obviously lots of other options, like Heroku or Digital Ocean, that cost a little bit more but require a lot less devops experience to get up and running.

    1. 3

      Great input!
      It really depends on the implementation.
      https://xkcd.com/1425/ :)

    2. 2

      I really appreciate this perspective. For those newer to the SaaS MVP space, it is like having one foot on gas and one on brake. Fun as heck to build out one's dream and the amount of affordable "firepower" is insane. Still, so much to learn! React, AWS Lambda-verse, graphql, the list goes on. I am not complaining only saying the road is a bit longer than our expectations allow for. Great, great discussion here. Thank you!

    3. 1

      @ryanvanderpol hey thanks for the answer. I wanted to know more about mongodb atlas. Is it good for a product which is soon going to gain good traction, how was your experience with it? And how is it compared to spinning up your own mongodb on a server.

      1. 2

        @vamsi7 Atlas is just a managed MongoDB server, nothing special about it. It scales well and is cheap. Honestly, I would never spin up my own cluster. Ever. There are other options out there, too (mLab, ScaleGrid, GCP, AWS, etc). Managed solutions these days are cheap, low maintenance, and set up better than I could ever do myself.

    4. 1

      I ended up having a similar bill for Google cloud and decided it was too much to pay for a HA postgres db. I bought my own blade server (used) and host it in a secure data center for about 200 a month. It's faster, I have more resources and costs a tenth of the price. Cloud is really expensive when you're no longer too small. I think more people should consider buying physical servers once things start picking up.

  2. 4

    This can be very cheap. But it depends on your app, if it consumes a lot of resources.

    Try Cent OS which (in my experience) uses very few resources.

    Foe $20 p/mo you can have your own VPS with DigitalOcean, have your app hosted, with SSL etc (you can configure all this with SSH)

    1. 4

      I use the $5 p/mo DigitalOcean droplets and they work great.

      1. 2

        Yes, very great way to start and to scale when growth happens

    2. 2

      Can you talk a bit about what concerns you need to pay attention to when deploying an app to a VPS vs using a "normal" pre-made host that automatically deploys these?

  3. 3

    $10/year DNS
    $5/month server
    $3600/month candles
    $5/month email sending
    someone who is good at the economy please help me budget this. my family is dying

    But seriously, you need to know more about what your app is and what services you'll require to operate it. Your cloud services/hosting providers will have detailed price lists, so once you know what you're going to need, you can price it out reasonably easily.

  4. 2

    It depends on what data you need to store, how much and where (server locations).

    I personally only use VPS or dedicated servers, where I pay a fixed monthly fee and know what I'm getting, if I need scaling I just add more servers, it usually ends up being cheaper than auto-scaling on AWS and it's also a lot easier to get started with and monitor costs (there are a lot of AWS horror stories leading companies to bankruptcy because they forgot to turn off some servers).

    Costs are purely based on the needs of your SaaS, if you need high bandwidth (video broadcast) the server confirguration is very different than high-CPU, low-latency gaming servers CPU game servers for example.

    Think about what are your requirements for the servers and search the best deals for that specific configuration.

    1. 3

      While I agree that AWS is complicated for the beginner and if you're not careful costs can get unnecessarily high I've always used multiple price warning triggers to tell me if AWS monthly costs are going above certain limits.

      Also as others mention, it can be a really dirt cheap setup for products that work at pretty significant scale and availability, e.g. react on S3 serverless with some RDS serving your app with an API hosted as a lambda (this a very well documented approach, with tons of free blogs/tutorials online). The database is the only thing I imagine would get costly in that kind of setup. However, this would only happen for 3 reasons: 1) Queries/API calls from your app are poorly designed, e.g. too much data requested too frequently, 2) your app is gaining some insane traction, in which case hopefully you're making money of out it, 3) your app is crazy data intensive, e.g. some complex analytics play. In case 1 I think you'd want to know about it and fix it sooner rather than later anyways, in case 2 the AWS approach works better I'd day because manually spinning up spinning down servers isn't something I'd want to have the headache of - especially if I'm a solo dev founder - if I'm getting super crazy traction, I want to monetize it, in case 3 I'd concede maybe a more price optimal use case than AWS would be good, but still avoiding the DevOps hassle would be best. I just find it hard to switch mindsets between infrastructure and things like frontend code that's the difference between converting or not converting a customer.

      1. 2

        I personally like setting up server architectures, and on DigitalOcean for example it's really easy, you can create a new server in 3 clicks and you can use an image (eg. Docker) to safelay duplicate servers. There's something that feels good about knowing that you have that server there, in that location with those resources.

        I do agree with you that with AWS it's easier to automatically spin up/down servers, but I think very few companies actually need this, and if you're a company big enough to need this you might also consider investing in your own servers if your team has the skills to set them up correctly.

        I have never really used AWS before, only a bit of Google Cloud so my opinion is really biased and limited on this specific topic.

  5. 2

    I really think founders are overestimating or complicating this.

    Certainly, it's good to calculate. No question. With cloud it's not really that crazy.

  6. 2

    Hi João,
    This is a REALLY general question but I'll give a few guidelines:

    • Today hosting SaaS is generally very cheap - usually, if you're building something with ANY value, you can get credits ( I got $500 in an email and then another $3K once I showed an MVP to AWS). So even if you spend $50-$100, it's easy to get it for "free" for a year or two.
    • Expensive things are - storage, bandwidth, computing power. Anything that isn't heavy on these things is almost free.
    • I've built things on a simple EC2 with dockers that ran a very powerful SaaS backend. Think about what you can do on your laptop, if you get an EC2 with similar performance and run all your dockers on it, you'll get comparable performance. That should cost you <$100 a month easily, maybe even <$30 a month (i.e. in the free tier of most cloud vendors).
      Hope this helps,
      Jonathan
      PS If you'd like to hop on a call, I'm doing 30-min (free) consults for the community https://calendly.com/jonathanoron
    1. 2

      Very interesting, thanks you for your insight! Do you email the companies directly to get credits with AWS?

      1. 2

        AWS has so many "programs" that offer credits, but it depends on your space.
        e.g. https://aws.amazon.com/activate/
        Usually, you start with the wrong one and they point you in the right direction :)

  7. 1

    From my own experience, this is less to do with costs, and more to do with analysis-paralysis (premature optimization).

    After several failures, and a success, I've learnt to choose the simplest, cheapest or quickest option that will get the job done, and help launch something out in the world.

    In the early-stage, most SaaS can be built with a static website and a few cloud functions (Cloudflare Workers, GCP or Azure Functions etc.), so makers don't really have to worry about architecture design, infrastructure costs, hiring and other time-sinks for a long time, probably until $1M MRR.

    Customers don't care about servers. They care about how helpful a product/service is to them.

  8. 1

    It surely depends on what kind of app you are building. For a simple web app you don't need to spend anything. Google Firebase + Netlify + Zoho will cover most of your needs.

    For the first year of my indie journey I haven't paid anything other than for domain name. I was able to run most of my web apps on google firebase functions/hosting etc. Email on Zoho.com static sites on netlify.com (even now I have few static sites there). These are all free.

    Now I moved to Paid Google Cloud, AWS, DO ...

Trending on Indie Hackers
How I grew a side project to 100k Unique Visitors in 7 days with 0 audience 49 comments Competing with Product Hunt: a month later 33 comments Why do you hate marketing? 29 comments My Top 20 Free Tools That I Use Everyday as an Indie Hacker 16 comments $15k revenues in <4 months as a solopreneur 14 comments Use Your Product 13 comments