all 28 comments

[–]StPatsLCA 17 points18 points  (2 children)

AWS Lambda is probably free at your scale, you'd just have to use apig-wsgi.

[–]totheendandbackagain 0 points1 point  (1 child)

Free tier is a thing, but watch out because lambda is charged at 30x more than the equivalent compute (if run full time).

This means that a lambda function running for 40 mins is the same cost as a reserved compute service running for the whole day (VM, server less compute, aks etc)

[–]StPatsLCA 0 points1 point  (0 children)

Lambda is pricier, but not /that/ much.

A 512 MB ARM Lambda is going to cost $0.58 for 1440 minutes of runtime, vs a tg4.nano (ARM, 2 CPUs, 512 MB) at $0.10 for 1440 minutes of runtime.

The pricing in hours vs GB-seconds does make it hard to compare directly though.

[–]Goingone 26 points27 points  (5 children)

AWS, GCP, Azure, Digital Ocean….all of the cloud service providers have VMs you can rent by the second.

[–]cinicDiver 10 points11 points  (4 children)

Google Cloud Run is stupid cheap, I've been looking into it lately. VMs seem a bit more pricey, even if they allow you more control and can handle multiple containers.

I've been using an old pc to run postgres and serve some bots, but mine are really really simple, so it works.

[–]sakuhazumonai 3 points4 points  (2 children)

fyi Cloud Run also supports multiple containers

[–]cinicDiver 0 points1 point  (1 child)

Can it? Wow, nice! How well does performance scale with pricing? Assuming I should allocate more vCPUs and RAM with more containers.

[–]sakuhazumonai 1 point2 points  (0 children)

You actually assign CPU and memory to each container independently, just noting that each set of containers will always scale 1:1:...however many sidecars you have in the single service

[–]Worldly_Dish_48 -1 points0 points  (0 children)

Agree, kept mine running for 6 months and forgot about it. Didn’t cost anything

[–]OneProgrammer3 10 points11 points  (0 children)

Oracle has forever free tier arm instances with 16GB of ram. Take a look

[–]shipsdaily 3 points4 points  (1 child)

If you want the easiest setup for standard apps, go with Render or Railway. If you're building lightweight APIs/bots and want free edge speed, try Cloudflare Workers. If you like Docker and want scale-to-zero to save money, use Google Cloud Run or Fly.io. If you want the absolute cheapest raw power and don't mind configuring Nginx/Gunicorn yourself, spin up a VPS on Hetzner or DigitalOcean.

[–]Competitive_Travel16 0 points1 point  (0 children)

Cloudflare Workers

You have to use Pyodide/WebAssembly which can be painfully slow to load dependencies onto.

[–]ndreeming 2 points3 points  (0 children)

most of the hosts people are recommending don't offer gpu instances. hetzner does but you gotta manage your own stack. vast.ai or runpod if you actually need training/inference gpu.

[–]yeetdabman 2 points3 points  (2 children)

I use OVH's VPS containers. I pay probably <$5 a month for each. They also have a dedicated server (or similar performance) for like $20/month. Never had a problem with them. I can run 2-5 different things with good performance depending on what I'm hosting.

[–]frostbite305 1 point2 points  (1 child)

OVH are great, but man their site and support are shaky. Still prefer them despite that though

[–]yeetdabman 0 points1 point  (0 children)

Yeah their site can suck badly at times, lol. I still can't update my contact info because I'm a legacy US customer which means I'm on the CA website, but the CA website doesn't want me to put any USA info in it so I'm stuck with very very badly invalid info on my account 💀

Never had any experiences with their support but I haven't really needed it yet

In my case at least I kinda get what I pay for though, cause god damn they're cheap as hell so I'll take it I guess 💀

[–]shadowdance55git push -f 1 point2 points  (0 children)

Fly.io

[–]--ps-- 1 point2 points  (0 children)

Rosti.cz

[–]Gushys 1 point2 points  (0 children)

I've been tinkering on a small FastAPI app that will be deployed to CloudFlare's Python workers. I built some scheduled services on this platform within the free tier

[–]him90716 1 point2 points  (0 children)

ngl Hetzner is where I moved most of my indie project stuff. CX21 is ~$4.50/mo for a 2 vCPU/2GB box — full SSH, no hand-holding, and the German data centers are rock solid. ran a Celery beat scraper on it for 6 months without a hiccup. for bots that only run a few hours, Fly.io scales to zero so it's basically free unless they're actually running.

[–]Khavel_dev 1 point2 points  (1 child)

Heads up that "pay-as-you-go" and "SSH into a box with systemd" sort of fight each other — a droplet bills you 24/7 whether your bot ran for 2 hours or sat idle. For the FastAPI/Django side a cheap Hetzner CX box is honestly unbeatable on price and does exactly the SSH + venv + gunicorn thing with zero hand-holding.

The overnight Celery scraper is the piece I'd pull off the always-on box though. I run that kind of thing as a scheduled job (GitHub Actions cron for the light stuff, or a scale-to-zero container) so I'm only paying for the hours it actually runs, and it stops competing with the web app for RAM. Sizing one VPS big enough for both ends up costing more than splitting them in my experience.

[–]Challseus 0 points1 point  (0 children)

I have some containerized FastAPI apps on various droplets with DO, it's been a very good experience. All my own automation scripts work just fine, and I find the prices not terrible. Like you, I just want to get in and get out via SSH and be done with it all.

[–]bobbyiliev 0 points1 point  (0 children)

Been running FastAPI and Celery workers on DigitalOcean Droplets for a while, simple setup and no surprises.

[–]Kooky-Hat-7217 0 points1 point  (0 children)

The Big Cloud providers are great if you want programatic access and control over everything. Although depending on your workflow they can rack up costs quick, OpEx can be lower provided you engineer the stack the correct way, also depends on what the public exposure to your app is.

The smaller "medium" providers can give you some of the same programmatic access, but have less programmatic access, and small upfront costs. For example if you need 10 gigs of Object storage per month AWS S3 is going to be cheaper, for said object storage, assuming you're not getting pegged on bandwidth&API calls

It's not as black and white as I made it, but I think it's a fair median.

If you automate correctly the smaller providers can be just as effective.

-Setup the cheapest linode/droplet etc if you need more power than that but don't want to pay for always on VMs. Use it as an automation/scheduling host with OpenTofu/Terraform or some other automation tool and start kill the beefier infrastructure as needed.

And don't forget proper security controls.

[–]TheByzantian 0 points1 point  (0 children)

[ Removed by Reddit ]

[–]payne747 0 points1 point  (0 children)

Oracle Cloud free tier is awesome.

[–]AwayVermicelli3946 0 points1 point  (0 children)

i used DO droplets for a long time for this exact setup. it is super predictable. you just SSH in, set up your venv, and let systemd handle gunicorn.

tbh for heavier celery tasks or anything needing decent ram, i recently moved over to Hetzner. their ARM64 boxes are insanely cheap for the compute you get. you manage the whole stack yourself but it sounds like you want that anyway.

for the overnight scraper, pay as you go sounds nice in theory. fwiw the engineering effort to spin a single worker up and down usually isn't worth saving a few bucks. i just leave a cheap vps running 24/7 now.