berkeli / immersive-go

Creative Commons Zero v1.0 Universal
10 stars 0 forks source link

Distributed Cron system with Prometheus monitoring (Main) #55

Open berkeli opened 1 year ago

berkeli commented 1 year ago

Extras:

In an earlier note it was mentioned that there are security issues with simply exec-ing code in this way.

A better solution would be to use a [Firecracker VM](https://github.com/firecracker-microvm/firecracker/) to run the cron commands. Firecracker is an open-source virtualization technology that lets us start lightweight virtual machines very quickly and cheaply. It was developed at AWS to support services like AWS Lambda.

Here are some demos and examples of projects built with Firecracker:

https://stanislas.blog/2021/08/firecracker/
https://jvns.ca/blog/2021/01/23/firecracker--start-a-vm-in-less-than-a-second/
There is a [Firecracker SDK for Golang](https://github.com/firecracker-microvm/firecracker-go-sdk). If you have a significant amount of extra time available, updating the system to run commands in Firecracker VMs instead of exec-ing the commands provided would be a very good challenge.