7
12 Comments

Ask IH: Next.js stack that doesn't bankrupt an indie business?

Hey folks,
I am in the midst of the learning journey to code. It seems like its super easy to go and get started with Next.js, GetServerSideProps and Vercel, however I have seen multiple founders and devs using AWS infra instead due to a cost factor.

Curious how are you going around this? I am just thinking about the general server-side setup and the most efficient way of doing this as a solo dev.

on March 13, 2022
  1. 4

    Vercel’s pro plan is $20/mo per member and their enterprise plan starts at around $1750/mo. On pro, bandwidth is up to 1 TB, with additional bandwidth charging $55 per 100 GB increment. On pro, Serverless Function Execution is up to 1000 GB-Hrs, with additional serverless function execution charging $55 per 100 GB-Hrs increment. So really not bad as a core offering for small scale.

    You can self-host nextjs too with https://github.com/serverless-nextjs/serverless-next.js or https://github.com/milliHQ/terraform-aws-next-js

    You are not locked into using them for images and can use their competitors or self-host your own with https://github.com/milliHQ/terraform-aws-next-js-image-optimization My website is image heavy, so I chose this option.

    I personally have always avoided NextJS API routes in favor of https://www.serverless.com/ and https://nestjs.com/ these frameworks take care of so much for you—it’s like django (nestjs) vs flask (nextjs api routes). I am also exploring the beta of https://keystonejs.com/ for a database / graphql solution

  2. 3

    Using Vercel will be your easiest and simplest option. They have very generous limits on the pro tier ($20/month). Probably makes more sense to think about scaling once it's a real problem.

  3. 3

    For me, I containerize everything and self-host on DigitalOcean...
    I've served over 5M requests a month with their $5/mo droplet.

      1. 2

        Yup, using their managed k8s for my new project

    1. 1

      Do you have a separate database, or do you also run your db on the droplet?

  4. 1

    I recommend you to try DigitalOcean App platform.
    Super easy to setup and scale.

  5. 1

    We got $25k AWS credits via our incubator. Even a small indie project can get $1-5k if you ask the right people nicely.

  6. 1

    I avoid running on the server and use NextJs as a SSG coupled with Firebase hosting. This avoids serverless cold starts and loads your pages ultra fast using Google’s CDN. All backend communication is then done through callables. Most users find they don’t pay anything until their app goes viral.

  7. 1

    Most people In my circles just use $5 droplets on Digital Ocean. I’m running several apps off the same one. For something where you need more bandwidth, use Hetzner or go to Low-end Box.

    My biggest suggestion is, don’t over complicate things. AWS is way more headache than you need now.

  8. 1

    Vercel and Firebase are free at the start and as you grow are still really inexpensive. I had over 1500 active users using Firebase and paid $5/mo at most.

  9. 1

    It seems like you are putting the cart way before the horse. Looking at vercel pricing it's $20 a month for 1TB of bandwidth and 1000 GB-hours of execution. If you are running into issues there, 1. congrats, 2. hire someone to figure this out for you with your vc money.