azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
3.65k stars 130 forks source link

[FEAT]: Master/Agent or Cluster setup - One instance, multiple servers #348

Closed ThaDaVos closed 1 week ago

ThaDaVos commented 1 week ago

Feature Description

It would be cool if you could run one instance of Cosmos which manages/controls multiple servers as if it was one big server (from the interface perspective) - perhaps even supporting Wake-on-LAN, so you can have the heavy duty server be off, unless it's needed, for example a request coming in on the master which gets redirected to the server when it's on.

Situation/Case

In my case, I'll have three servers:

azukaar commented 1 week ago

Constellation allows the main server to control other servers but to a limited extent (create routes / sync users) but I still expect people to do more advanced stuff on their target server's UI. It's just more clear that way IMO

When it comes to decentralised load on servers that are started / stopped by Cosmos, aside from being very low benefits (even a big server do not consume huge amount of energy when idled (depending on hardware ofc) this is also quite niche, as the majority of people use a single server. But this is something you could automate yourself to an extent, ex. having CRON (supported in the Cosmos UI) jobs switch your servers ON / OFF

that's why I do not think that Cosmos would go that far into physically managing multiple servers that way in the foreseeable future

Closing the ticket for now but feel free to continue the conversation

ThaDaVos commented 1 week ago

I get that the request for waking up servers is niche - it was just an addition - but having Cluster support from a single UI would have been cool - haven't looked at Constellation, only thing I could find was Constellation VPN nothing in regard to managing multiple servers

Wish I knew GO better, cause then I would have been able to perhaps code it myself and submit a PR or something

azukaar commented 1 week ago

Constellation has 2 things :

I want to add a few more things for better integration but that's what 's currently in

ThaDaVos commented 1 week ago

Ah I get it - Would you be open for a PR regarding remote agent support/cluster support? Or is it not in the scope of Cosmos? Don't know how tightly coupled the UI is and stuff

azukaar commented 1 week ago

I'd rather not have a PR without precise planning to be honest, in term of functionality and UX. This is not a small endeavour