how much cheaper is it to run convex on
how much cheaper is it to run convex on railway? my issue with the managed service is the db bw costs are quite high
22 Replies
i have done extensive cost analysis on this one
self-hosting convex + postgres in docker compose running on hetzner is the cheapest
up to 300 euro for the higest tier on hetzner cloud
but you'd need to know how to manage a linux server, e.g. update OS, patch security, setup monitoring, setup db backup and etc.
initial setup is about a few hours of learning via claude code on the OS details, setup github actions for fully automated CI/CD and etc. (this is for me with quite some extensive devops experience in the past)
i estimate this will take 2 to 3 hours each month to check if the server maintenance script with github action requires any further polishing
with railway, 70% less work on maintaining the github actions for working with hetzner and 100% focus on the project
great answer thank you
I was attracted to railway due to their usage based pricing and reports of being very cheap and that convex hsa official templates for it hopefully easing a lot of the self host woes
the saving for the same hardware spec on hetzner vs using railway is about 9k USD per year for any serious profit projects
are we talking hetzner's eu deployments?
correct, i used germany data center
ah yeah my apps are usually US based and I'd like hosting there
hetzner US prices seem way higher
but BW overages are same
that could be up to 14k per year, give or take
and how much would this cost with convex-managed hosting?
100k? lol
i moved over to railway anyway 'cause
- i don't want to spend too much time on dealing with server now
- it scales automatically with my project: every user is a paid user and covers the resources they use, and I only pay for the traffic/CPU/RAM my app actually consumes, not a fixed plan limit.
if your project offers free plan and whatnot, go with hetzner, the cost with railway won't scale well economically unless you get the paid users to pay more to compensate for the free users
yeah I noticed, but that's true for all the managed dbs like supabase etc
you can't really use them if you have low margins/free traffic only
great for apps with free/premium tiers
but of course supabase can be self hosted as well.. though it's a royal annoyance to do so
correct, always start with business model -> marketing strategy -> tech stack if you're serious
what sorta app you got, mobile mainly? don't mean to pry just curious
i'm building basecamp alternative that works like slack + linear
i'm only using convex as the db source, moved most of the heavy lifting to cloudflare workers to workaround the lack of horizontal scaling limitation that self-hosted convex has
my tech stack:
- auth using workos
- web app using react router v7 on cloudflare workers + calls + workflows + queues + r2 storage
- db using convex + postgres + clickhouse + typesense running on railway
quite a setup
slack has gotten.. predatory as of late. alernatives are nice
yeah, 'cause self-hosted convex can easily become the bottleneck due to it's a monolith that does too many things and can't horizontally scaling easily (i tried updating the source code myself but it's almost impossible to catch up as the team is still updating and adding new environment variables over time)
that's an ambitious project, I am sure you must have pm experience and generally know the pain points through experience.
probably used basecamp a lot and see its shortcomings
lol
i used atlassian (jira, confluence, etc.), slack, linear, lark
been in the industry since 2011:
- worked at Trend Micro taiwan for my first job
- joined grab series C and left series G
- joined rapyd/spenmo early stage
- co-founded 1 YC S22 startup and had a co-founder break up in 2.5 months
- joined another YC S22 startup as co-founder for 2.5 years but quit after realizing the business model wouldn't work and we didn't have distribution unit economics work by being based in Singapore
yep! I knew you knew your stuff
I feel you're on point
good luck and prosperity friend 🙂
you too man!
honestly, didn't calculate this, but i was definitely worried by the egress bandwidth and query/mutation concurrency
the bw is expensive and if you're doing anything like slack you're gonna go through a lot
hetzner bw is literally like a penny
per gb
20x lower than the cheapest convex offers lol
and their plan included bw is super generous
yeah
the problem is not hosting itself, but the capacity it can handle.
if it can't handle more than 300 concurent users, you can host it on a tetris (raspberry pi) or just grab a cheap vps for 5 bucks a month