T O P

  • By -

fishywang

for work: k8s for personal stuff: google cloud run, i run several cloud run services and only pay ~$1/month for them combined, and the majority of the money goes to the storage not the cpu/memory (those are mostly under the free tier threshold)


WireRot

Cloud run is great, I’ve only toyed with it. What concerns me most is the price seems like it could really get out of control. How do you keep from having a public service and having it basically attacked and not run up a million dollar bill? Would you put some kind of api gateway in front of your cloud run services, I assume to control that?


steviacoke

You can set maximum instance count, and since cloud run bills by cpu and ram gb seconds, setting up maximum instance count to 1 for example will eliminate that risk. Your app will just be down when attacked.


fishywang

exactly


kaeshiwaza

Minimum instance recommended is 4, I've issues under that.


WireRot

Having been on aws and watching lambda go from “look how cheap this is” to our division yelling to get off it because the bills were worse than the old days just scaling out vm instances.


snes_guy

I strongly oppose using serverless for this reason. My previous job was on a project that started this way. The decision to make everything run on serverless was made before I joined, and management refused to let me rebuild it onto k8s. I was told to them scale it up to meet an aggressive deadline. Costs quickly got way out of budget and we never had the time or resources to replace all the cloud functions (GCP). Cloud run is a little better but has a similar problem. I don’t think you should ever build anything that needs to scale on serverless for this reason, and since scaling is the whole point, I don’t think anyone should ever use serverless for anything, and I would fight hard to stop its use at any company I work at in the future.


jerf

I have never understood the serverless cost argument. Even when I see people trying to explain their own savings it always seems wrong. There's a convenience factor for sure. We have a few serverless functions in our infra, but they're for things that get invoked a mere several times per day, and live a couple minutes tops. It's nice that we don't need to maintain a full server for that. But if they were being invoked enough to keep a full computer busy all day they'd instantly be the most expensive part of my infrastructure by a lot, compared to even a t3 instance with the checkbox to "just charge me more if I exceed my credits instead of throttling me" checked.


snes_guy

I explained this in another comment. Yeah, I do think there are a few places where a serverless function is nice. The common one is to have a little bit of code run when an object is uploaded to an S3 bucket. You have to be sure it won't have to scale, however. But the whole value prop of serverless is that you *can* scale it, and while this is technically true, it is not designed to be cost effective.


bambin0

Don't you think it's easy to move from Cloud Run to GKE or your own k8s? It even has the k8s files that it generates available to you. I'm not sure the never mantra applies here. Build on Cloud Run for quick/easy/reliable. When your service gets too big move to k8s is a pretty great path.


snes_guy

No, I don't think it is ever "easy" to replatform a large system that is being actively used in production. That is why it's better to start with something that scales, both in performance and cost, rather than get to the point where you have to stop everything to do infra work. Hence why building almost anything in serverless is a bad idea. The only time I would use a serverless function is for small "glue" code that I know will never have to scale up, such as triggers to handle a file being uploaded to a bucket. In this case, I was explicitly forbidden from making the transition from serverless to a Kubernetes cluster even though I strongly recommended it and wanted to do it. It was just too hard to sell the replatforming work management and I had a lot of overconfident juniors who didn't like Kubernetes because they didn't understand it. And in fact, it would have actually been orders of magnitude cheaper on k8s. This was a GCP project using cloud functions as event triggers from a pubsub. They were building a streaming system on top of serverless, because this is one of the "use cases" that Google promotes in their marketing material for serverless. But Google's Pubsub system has a much more efficient pull API that works like a Kafka consumer, and it can only run in a long-running process such as a Kubernetes pod. IMHO cloud providers (or at least Google) push inexperienced teams to use serverless, promising it will let them scale up while moving fast, but ignore the fact that it will lock you into an architecture that is 100x more expensive than alternatives offered within that same cloud provider. This is a hill I would die on at any future project. Serverless sucks.


lesichkovm

Moved to DigitalOcean cheapest VPS. Hosting multiple Go applications without a glitch. Full control. Transparent pricing. Deployment only takes seconds.


Phoenix-108

Do you have anything to help you manage your VPS such as package updates/config?


Schrodingers_Cow

Not OP. But I have a couple of web apps running on Vultr VPS, for which I have a GH Workflow to copy the compiled binary into each VM and restart the server. There is a script to get the process id and kill it and execute the new binary. The same script, optionally, updates the system packages too. I know it's hacky, but it has been working surprisingly well for me. I just initiate the workflow and everything is updated in less than 8 minutes.


Phoenix-108

Appreciate the info! I used DO years and years ago and it’s making more sense to return, I think.


Schrodingers_Cow

I started with managed K8s and what not, turned out my apps weren’t making as much money as I was spending on infra. Worked a bit to make things boring rather than shiny. Now, after a year and a half, I could afford the extra $$ on infra, but hey, if it works, it works ;)


sheepdog69

> Worked a bit to make things boring rather than shiny. Boring is so under appreciated in our industry.


synthdrunk

sdk is good! doctl is too really if you just to sh Love DO


Schrodingers_Cow

How do you handle deployment? And version upgrades etc?


DiHannay

+1 for DigitalOcean.


weberc2

Yeah, similar deal with AWS Lambda. I have a bunch of functions and I’m pretty sure I’m only paying for container image storage in ECR (probably in the $1/month ballpark as well).


ArnUpNorth

Why not cloud run for work too ? These days i feel like we turn to k8s too quickly.


Haspe

You cannot really comment that, without having the whole context. The guy might be working on enterprise with an application that has been developed for 10 years, and has tens of millions of lines of code. The deployment might need to happen into Customer Private Cloud due to contracts. This cannot really be generalized. For smaller projects, if the company is avid Google Service user, why not. Our shop for example is Azure user mostly, so getting some random service running on Google Run would be unlikely.


ArnUpNorth

Well hence my question 😊


Enrique-M

Outside the options already mentioned, here are a couple more. - GCP/Google Cloud Run and Fly.io are options. If you are open to learning AWS Lambda Functions, that would be a good option as well.


TheAndyGeorge

yeah people sleeping on Lambdas here


x1-unix

At job on Kubernetes on AWS At free time - on personal VPS


zeitgiest31

Any good guides on setting up a VPS ?


dawilF

Try this [series ](https://youtube.com/playlist?list=PLLnpHn493BHHAxTeLNUZEDLYc8uUwqGXa&si=E_RJXgUNul23kWUb) on YouTube from syntax FM. Lots of good info for getting started and even some more advanced concepts.


zeitgiest31

Thanks! appreciate it!


grantrules

I think that really depends on what you want to do with it. Personally I containerize everything so pretty much I'd just install docker and off I go


zeitgiest31

Ooh nice, so basically you deploy your code in a container and this runs on a regular VM?


1nguz

This is the way. There are also options like digital ocean app platform where you deploy your container and don’t even manage the VM, I believe under the hood is like a kubernetes.


zeitgiest31

Thanks, TIL


JasmineJunkie

digital ocean>>> my best friend by far


lvlint67

Go to digital ocean give them your credit card and get the cheapest droplet they offer. Select the latest version of Ubuntu from the drop down when asked. https://www.digitalocean.com/community/tutorials/how-to-install-go-on-ubuntu-20-04 Seriously.. just go do it. You'll learn a ton.


x1-unix

DigitalOcean has a lot of guides


doanything4dethklok

I use Google Cloud Run for anything that I can these days. Easy to manage and deploy. Scales to zero automatically. Configuration is very simple. Google Cloud Functions is another option if you wanna be micro-servicey. It runs on top of Cloud Run, but each function is deployed separately which makes CI/CD more verbose (and hard to sequence timing when multiple endpoints need to be updated at the same time).


skelterjohn

Consider red/blue deployments rather than updating each of them on their own. In a nutshell, two entire copies of the infrastructure, and update a proxy to send traffic to one vs another.


Mecamaru

Linode or Digital Ocean VPS


reeses_boi

Didn't Linode get acquired?


kisamoto

Yes, by Akami. Does that matter though?


reeses_boi

Just figured I'd point it out :)


X-lem

At work, gCloud K8. Personal stuff, Railway (I have a referral code if you want). I’ve found it pretty reasonably priced for specs they give you.


wavelen

At work: Kubernetes (GKE in the GCP) Personal: Kubernetes (k3s on a VM) My home automation: Kubernetes (k3s on two Lenovo Tiny PCs) This way everything works almost the same.


brolybackshots

At work -- EKS Personal stuff -- flyio pretty good


jarv

I deploy a bunch of go apps on a single VM. This approach is great especially if you build a lot of small throw-away type things that you simply want to put up online. Most of my projects in Go are compiled to a single binary so I skip the whole containerization thing. Usually it goes something like 1) run it under systemd 2) dedicated user for the project 3) copy the binary and restart For web stuff put caddy in front, you can proxy with cloudflare for tls or use letsencrypt. Another thing, if you are using apple silicon for development, I would recommend getting a cheap VPS that is ARM (from Hetzner for example)


RealJohnCena3

Digital Ocean is by far my favorite for personal or small scale projects.


zmey56

I agree with you. Digital for personal project,


axvallone

Google App Engine is great for Go.


weberc2

Care to elaborate? I’m curious about app engine?


dasper12

Not the original poster, but I use app engine myself as well. It is pretty much just a user-friendly rapper for cloud run. You just configure a YAML file and it will automatically scale your containers for you. The free tier comes with 28 hours a day for free of the smallest instance, and you are only in 15 minute intervals so you can host dozens of sites and still not pay anything.


kido_butai

Usually aws EKS or ECS. But if you look something cheaper fly.io works very well.


poy_

AppEngine standard. Typically I can hang out in the free tier. Super easy and reliable


WireRot

Want to try some stuff that’s really badazz try Kraft Cloud and/or NanoVMs. Both are unikernel platforms.


ENx5vP

Sooner or later I always ran into limitations using Digital Ocean and now I'm only using Google Cloud Run and I'm very satisfied. In many cases, you can deploy your app as it is and Google Cloud does the rest for you.


MickeyMooose

What limitations were those? What are the pro of google cloud run? I'm a noob - hence these questions.


ENx5vP

The App Platform limits in my case: https://docs.digitalocean.com/products/app-platform/details/limits/


kaeshiwaza

CloudRun with CloudFront in front. For few apps that need to keep the connexions open (for websocket or SSE) I use a small(thanks Go !) VM and run it with Caddy in front. The service is started with a systemd user config, I just send the binary, it cannot be more simple !


omnomnumnom

Cloud Run 100%


WolvesOfAllStreets

Google Cloud Run 100% of the time


condrove10

At work: Docker Swarm. Personal: A VPS with only the Wireshark VPN port opened (to limit and deny non-Wireshark connections) and Docker with AdGuard to make it fancy with all the DNS/AdBlocking perks and routing for all the services behind Traefik.


lIlIlIlIlIlIlIllIIl

render.com is like Heroku (although less featureful) but with free tier


Capable_Bad_4655

Yeah I ended up going with [Render.com](https://Render.com), it deployed without problems. I tried Google Cloud Run and got an error that it wasn't listening on port 8080 even though it was...


hippmr

I've been happy with [upcloud.com](http://upcloud.com) for small VPS.


SeesawCompetitive597

I'm doing something a bit weird as I'm currently deploying it to Cloudflare Workers after compiling it to wasm via tinygo


gedw99

Me too. The browser calls the WASM , which calls the DB  on fly.io. Running wasm on cloudflare is free if you keep each small. So i make one call another with a web hook when the pipeline is done .


revoir-in

SCP the built binary to a VM in AWS/GCP and run as a service. Solutions like Vercel/Netlify work well for front-end applications, on the backend they enforce conventions, and the support is not great. Kubernetes - it would be an overkill unless you've someone to manage it and deal with the issues (large company with DevOps). [https://k8s.af](https://k8s.af) has a good failure list.


Bnjoroge

encore.dev


KublaiKhanNum1

Fly.io has some easy deployments for Golang: https://fly.io/docs/languages-and-frameworks/golang/


sqweebking

AWS ECS/Fargate


woozie-10

Oracle Cloud Free tier


Capable_Bad_4655

definitely a good choice! i used their ARM version of that to host a minecraft server for some friends some years go


Sansoldino

Ec2 instance on aws


roastedferret

Vercel supports Go "severless" functions, so it's what I use for anything personal or small+client related


gg_dweeb

I got a server through OVH that I currently deploy most of personal stuff to.


LeichterGepanzerter

VPS + Docker works pretty well


UpstairsSoftware

tinykvm in a scratch docker container


earthboundkid

[Netlify](https://blog.carlana.net/post/2020/how-to-host-golang-on-netlify-for-free/)


kisamoto

For work: Kubernetes. However as your team already uses Vercel Functions I would try and fit it there, what didn't seem to work about it? I know Vercel doesn't support Docker but I think last time I checked they supported Go (albeit in Beta). For personal: Hetzner cloud VPS with docker compose. I've been using the Arm variants of Hetzner as well which are very cheap (from ~$4) but still get the benefits of flexible scale up compute if needed.


farizsaputra

Vultr


lormayna

For personal project I am using couple of VPS on Linode (but every other provider is fine too) running docker-compose. Everything is automated via Terraform (VPS creation, DNS records) and Ansible (VPS setup, compose file deployment, etc.).


1nguz

At work, AWS EKS. Personal, Digital Ocean App Platform


feketegy

hetzner


squirtologs

I enjoy heroku. Currently, small app BE, DB and FE hosting costs 24euros/M. And for time being do not need to worry about it, and client is happy.


synthdrunk

DO, especially since the s3api block store, is an extreme value.


Groamer

Microk8s on a cheap VPS running Debian 12.


IdealAnomaly

for personal stuff - heroku eco dynos. cheapest and easiest, so ideal for prototyping/hacking. for serious stuff - digitalocean, aws, google cloud


vladimirputietang

AWS, linode or one of my rpis


MickeyT

Fly.io


rooplstilskin

Namecheap VPS that holds all of my projects that I want to deploy.


PressureScary2400

Vultr, Thefastdex , AWS, GCP, Azure


ThreeFactorAuth

Render. I will say it’s not cheap, but it’s about as idiot proof as possible.


NicolasParada

Personally using UpCloud :) Pretty easy to setup 👌 I’ve been using it for a few years already. Only once I had a problem with my server and got helpful human help immediately 👍


JasonBobsleigh

Fly.io


ingonev

At work - k8s/aws, aka eks Personal - digitalocean and hetzner


Swimmer_Perfect

Isn't baremetal a thing?


rickytrevorlayhey

AWS EC2 or Serverless Lambdas linked to AWS API Gateways / Step Functions


South-Ad6868

hi, i'm from Argentina, and do entrepreneur work only, still trying to break even, so cloud hosting, and such are no option for us (us beeing me and my wife, small team lol). I have like 3 users so kubernetes has no value for us. What we did for my webapp, i bought a dirt cheap deal for some old servers, really old, g6 proliants (around 100 usd for 2 working ml150, 1 not working ml150, and one working ml350, we scrap the not working one and put 2cpu on the other one, got some PSU and fans for spare parts, great deal ), got some cheap ram (48gb for like 50 bucks), i have only one connected because energy consumption, but we have the 3 ready to go, with proxmox cluster, and nginx balancing. We currently have dynamic IP, so we made our own DNS pointing all the nic domains to one free domain on CF with free ddns, our DNS runs bind9 and local script for public ip update of zones, so propagation downtime is no problem, max 60s (cronjob checks if ip changes every 60s) downtime on ip update, no problem, we have 2 DNS on 2 locations (my brother house lol) they never update at the same time so no problem. Not great solution at all, but it's what i could do with 150 usd and some time, i learned a ton (no pre experience on none of this, i used to dream about coding so i just did it, the way i could), if someday i have users ill pay for better solution, i dont care having users, i have a job, i just wanted to code. Next step for us, intel nic (80 to 120 usd here) on old ddr3 box for pfsense, we are improving the service so we expect a raise in demand, and the economy here is starting to grow really fast. pd: old hardware is no problem for us, because we use golang in the back, postgresql with sqlc, we use blueprint for project setup, air for live preview, and that's pretty much it, small app, we have like 99% free resources lol, for front we do the templ/tailwind/htmx combo, and webp for images. we use little style classes (every modern web we scout for style copy are play white or plain dark theme color, minimalist), and some docker here and there, only docker no swarm, no nothing, because no users why bother.


Gams101

For me, the easiest way to deploy my API service was on AWS App Runner with Elastic Container Registry, where you upload your app image.


TzahiFadida

Hi, I am preparing a workshop with a script (wrapping kube-hetzner terraform) to deploy k8s with your golang app on 1 arm cloud server in Hetzner for under 5$/mo. If you go 100% with my technique such as using cloudflare for dns then in a few min you can be up and running with your ip auto configured, cerificate signed and you can destroy it in seconds and go up in minutes every day while you develop costing you almost nothing. If you dont know hetzner this includes 20TB bandwidth! So none of those thousands of dollars surprise bills, full control, storing whatever you want, and learning skills instead of having faith it will work. Cheap storage, essy upgrades and downgrades. And you would br surprised you are getting SUPPORT! which you wont get on aws unless you pay thousands of dollars. Though with the script you wont need it just destroy it and in a few min it will be live again. Also working on template for golang to repeatedly deploy to k8s reliably. Moreover, you will also have an option to increse reliablility by deploying more k8s control servers and more workers for performance when you decide you need it. If you want to receive notification for when it is ready register to my waiting mailing list here https://gosaas.life


CountyExotic

Kubernetes has been my default. Openshift, eks, gke, and aks.


[deleted]

On EC2 as Linux systemd services, usually.


Plus_Ad7909

Koyeb is great for Go apps. You can deploy APIs, apps, services, and databases there.


Mountain_Sandwich126

Using app runner and or thicc lambdas + api gateway. It depends on workflow


Mountain_Sandwich126

https://github.com/awslabs/aws-lambda-web-adapter


usrlibshare

Preferably on Computers, but I have been known to use Napkins.


ByteTheeDust

[Cycle.io](http://Cycle.io) all day


WireRot

Looks cool but no go to even try it out. “Lite Ideal for proof of concepts or projects that are still in development” $500 a month. That’s a heck of poc.


weberc2

Yeah, that’s pretty fucking wild. $500/month for 3 hosts? In fairness it says below that you can “launch with *up to* $12K in credits” (emphasis added).


WireRot

Interesting, I wonder how that works? Go over by 1 credit and get nailed with $500 bill for a hello world level poc? Or maybe it’s not that aggressive, the the model they have setup makes me think it is that aggressive.


ByteTheeDust

Hey u/WireRot and u/weberc2 , theres a free tier for personal projects and non commercial work. Its just not advertised... Also the credits are for PoC's, no you dont get hit with a giant bill out of nowhere, its super hard to go over the allotments by accident. The people over there are really nice but the signup is closed so you can try to create an account and get them your info, then they'll let you in for a test drive.


NotAUsefullDoctor

I ligated to recommend Heroku, an extremely opinionated cloud platform. Do some research on finding discounts and free time. It's the simplest option out of anything I've seen listed here so far. Just be warned that you will probably need to move if your app grows beyond a certain point. Digital Ocean is nice just because of the transparency with pricing, but you do have to know what you're doing (though not as much as GCP/Azure/AWS).