Ask
118
@costbasis_carl ·

vercel or a $12 vps for an app router app at 300k requests a month Deploy

Solo, budget is $40/month all-in including the database. Currently doing about 300k requests a month, of which maybe 240k are cached HTML. ISR on roughly 900 pages that revalidate hourly, and image optimisation on user-uploaded photos, which I suspect is the expensive part.

I can run Docker, I have set up nginx before, I do not enjoy it. What actually goes wrong on the VPS side that people do not mention until you are already there?

9 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @metronome_mel · 4mo ago

    Been on a €4.50 box for 14 months with a Next app, Postgres and a worker. It is genuinely fine. The compose file is 30 lines, backups are a nightly pg_dump to object storage with a 14-day retention, and I have had one incident, which was me filling the disk with logs because I never set a rotation policy.

    Set log rotation on day one. That is the whole warning.

    24
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @wrangler_dev_jo · 4mo ago · 3 replies

    Three things bite, in this order:

    1. ISR cache is on local disk by default. One box, fine. The moment you run two containers for a zero-downtime deploy they each have their own cache and users see pages flip between two versions. You need a shared cache handler pointed at Redis, which is another service to run.
    2. Image optimisation is CPU and disk. sharp will happily eat a whole vCPU resizing a 4000px phone photo, and the optimised images accumulate on disk until something fills up at 2am. Cap the sizes you allow and put a real cache in front.
    3. You become the person who renews the certificate. Caddy makes that mostly automatic, which is why I use it over nginx for this exact setup.

    None of it is hard. It is about two evenings up front and an hour a month afterwards. If that hour is worth more to you than $20, stay managed.

    38
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @costbasis_carl · 4mo ago

      The two-container ISR cache split is exactly the kind of thing I would have found out about from a user, thank you. Might just run one container and accept 20 seconds of downtime on deploy honestly.

      12
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @metronome_mel · 4mo ago

      One container plus docker compose up -d --wait on a new colour and a two-line Caddy upstream switch gets you the zero downtime without the shared cache problem, as long as you accept both are briefly live. For 300k/month nobody will notice.

      9
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @lowtech_lior · 4mo ago · 2 replies

    300k requests a month is 0.11 req/s average. That is nothing. Your decision is not about capacity, it is about which failure you would rather have: a surprise invoice or a surprise outage.

    Before you move, go find the actual line items. In my experience the two that blow up small bills are image optimisation and middleware invocations, and both are fixable in place. I cut a bill by 70% by serving already-resized images from object storage and never touching the optimiser.

    29
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @wrangler_dev_jo · 4mo ago

      Strong agree on doing this before moving. Half the people who migrate to a VPS to escape a bill discover afterwards that one feature was 80% of it, and they now own a server for no reason.

      11
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @layoverlurker · 4mo ago

    The honest cost is not the $12, it is that every framework major becomes your problem. Managed hosts absorb a lot of build-toolchain weirdness silently. On your own box you will read release notes.

    15
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @epoxy_puddle · 4mo ago

    I moved to a VPS to save $20 and spent the savings on a monitoring service so I would find out before my users did. Net zero, but I did learn a lot.

    11
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @bedtime_bargain · 4mo ago

    $40/month budget and 900 ISR pages - have you considered that 900 pages revalidating hourly is 21,600 regenerations a day for content that probably changes weekly? That is most of your compute right there regardless of where you host it.

    19
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report