News for hackers. Stuff that matters.
Re:Ask HN: Infra people in small companies, what does your i... by alxmng on Saturday November 04, 2023 @01:50PM (#38143439)
A $40/mo VPS. Caddy web server. Supervisor to restart automatically. Git to deploy. CI using GitHub actions which build, run tests, and push to server on success. Automatic VPS snapshots and a cronjob to backup the DB to cloud storage. DB runs on the same box.

This has worked for years with zero maintenance.

Re:Ask HN: Infra people in small companies, what does your i... by mrngilles on Saturday November 04, 2023 @02:25PM (#38143759)
What's the size of the team working on this?

I'm guessing you're OK with the tradeoff of your machine going down sometimes?

Re:Ask HN: Infra people in small companies, what does your i... by alxmng on Saturday November 04, 2023 @02:40PM (#38143906)
4 people but sometimes 10 with contractors.

Sure, there's downtime when the VPS provider is down. That's no different than "managed" services.

Re:Ask HN: Infra people in small companies, what does your i... by mrngilles on Saturday November 04, 2023 @02:57PM (#38144045)
So you just have the dns record pointing to your machine's IP?

Do you have some kind of monitoring? What about logging?

Re:Ask HN: Infra people in small companies, what does your i... by alxmng on Saturday November 04, 2023 @03:17PM (#38144206)
That's correct. We used to use CloudFlare, but it added too much time to each request (speed is important to us). So now it's just pointed directly at the VPS.

Crashes are logged but I don't think anybody has ever looked at the logs. I'm not sure a crash has ever happened (the app is written in Haskell). Unexpected errors are saved to the database and can be viewed using the web. If we needed logs people could tail them from the VPS (ssh -t $WEB_HOST 'tail -f webserver.error.log'). I know, I know, that's crazy. I'm told real software companies are supposed to ship them to someone else, and then pay them to view the logs using a crappy web interface.

No monitoring. If the site is down customers will let us know, which has happened a few times. Monitoring wouldn't help much with shipping bugs anyway.

Re:Ask HN: Infra people in small companies, what does your i... by aprdm on Sunday November 05, 2023 @12:03AM (#38148043)
One can easily set up prometheus/grafana or ELK or sentry when you're that small on another VM.
Re:Ask HN: Infra people in small companies, what does your i... by oops on Saturday November 04, 2023 @02:04PM (#38143586)
> A $40/mo VPS.

> This has worked for years with zero maintenance.

Do you apply security updates, e.g. for Caddy, the OS, db, etc.?

Re:Ask HN: Infra people in small companies, what does your i... by alxmng on Saturday November 04, 2023 @02:44PM (#38143940)
Yeah, every so often I spend 5 minutes and run apt upgrade. I don't think the DB has ever been upgraded because there's no reason to. It's not exposed to the Internet anyway.
Re:Ask HN: Infra people in small companies, what does your i... by chatmasta on Saturday November 04, 2023 @06:45PM (#38145993)
Your DB doesn't need to be connected to the internet for untrusted users to have a path for interacting with it. I assume your application sends queries to it, for example. And users give your application the parameters for those queries.

And that's when things are working as expected. All it takes is for one of your non-DB services to be compromised, and an attacker can now connect to the DB on localhost. That's why it's best practice to put a secure password on your DB even if you only expect connections from local services. And yes, you should upgrade it too... or at least apply security patches.

Re:Ask HN: Infra people in small companies, what does your i... by aprdm on Sunday November 05, 2023 @12:03AM (#38148044)
Lol, the amount of databases running real production heavy workloads for the biggest companies in the world that haven't been updated in 10y is probably very high :) at least the ones I've seen ..
Re:Ask HN: Infra people in small companies, what does your i... by alxmng on Sunday November 05, 2023 @12:05AM (#38148060)
Yes, database connections are password protected.
Re:Ask HN: Infra people in small companies, what does your i... by ttymck on Saturday November 04, 2023 @04:29PM (#38144823)
Are you hiring :D
Re:Ask HN: Infra people in small companies, what does your i... by aprdm on Sunday November 05, 2023 @12:04AM (#38148049)
yes this but with NGINX/Systemd! Haven't used caddy - will check