this post was submitted on 24 Nov 2023
2 points (100.0% liked)

Self-Hosted Main

515 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

Hi,

I've written some microservices and am looking to deploy them. Since I am not very confident in cloud pricing (= too expensive right now), I am looking into ways of operating a very small server setup.

Lets say I have 5 services, one is the database, 3 should be run as jobs every minute, one service should be scaled based on load.

I am aware that basically described tasks that k8s or nomad would be very good at it. The issue with them is: While I am going to update the services, etc, I do not need a large cluster. I am very sure that I can start with one pod/node and maybe get a second one, if needed.

For this setup, k8s (or other flavors) is just overkill (learning and maintaining it). Nomad from hashicorp looks totally cool for that, but it is recommended to have 3 servers with crazy specs for each of them (doing quorum, leader follower, replication, etc.) Which is overkill when I plan to have 1 worker node in total :D

Nomad has `-dev` option running server and agent on the same node, but in production? I don't know. Nomads server also uses his ip and other things for identity. When they change, the server instance is basically dead and loses its data. That's why a quorum of 3 servers is recommended as a minimal prod setup.

Docker compose is not ideal, because I would like to update single containers without tearing everything down.

Also, cron for my periodic tasks is not part of docker or docker swarm except plugins, workarounds, or configuring a container running `cron` but then meddling with `flock`, etc.

I am aware that it actually does not sound like I need an orchestrator, but monitoring all the jobs and restarting a container manually sounds not optimal for me and maybe there is something out there, that helps me.

Since the tech community knows more than me, I would love to get some other opinions or point of views.

Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] NiftyLogic@alien.top 1 points 11 months ago (1 children)

Nomad is totally fine to run on low-spec machines. On my homelab, I have the following running Nomad + Consul:

  • VM with 1GB as arbiter
  • 2 MFF PCs with 16GB and i5-6500T

Totally fine to run client and server on the same machine in a non-enterprise setup.

One stand-alone machine should also work, you just lose the failover capabilities.

[–] HosonZes@alien.top 1 points 11 months ago (1 children)

After spending a couple of days with k8s I really want to get back to nomad. k8s complexity is way too high.

The one thing about nomad is: There is much less documentation and community out there for nomad. Especially how to secure a nomad cluster in production. When you get stuck in internal details where you can't get out, you might be in trouble.

Have you had small production workloads running in public?

[–] NiftyLogic@alien.top 1 points 11 months ago

Same here, had a deeper look at MicroK8s and decided to go the Nomad route...

Unfortunately, I'm just running a homelab setup. With two publicly exposed services, but noting enterprise like.

Does that count as "in producion"? If yes, what are your questions?