Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could a --routes-refresh parameter be implemented? #271

Open
Codrax opened this issue Mar 2, 2024 · 5 comments
Open

Could a --routes-refresh parameter be implemented? #271

Codrax opened this issue Mar 2, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Codrax
Copy link

Codrax commented Mar 2, 2024

I would like to run around 10 servers simultaneously, and currently, to add/remove a server I need to change the config.json. And the proxy need to be closed and re-opened to index the changes.

With a --routes-refresh parameter, optionally taking a second input for how often to refresh the routes, the application could compare the last stored modification date of the file provided with --routes-config.

This would allow the server list to be updated gracefully without restarting all servers.

Thank you!

@itzg
Copy link
Owner

itzg commented Mar 2, 2024

That's a great idea!

@itzg itzg added the enhancement New feature or request label Mar 2, 2024
@itzg itzg moved this to To do in Docker Minecraft Mar 3, 2024
@itzg
Copy link
Owner

itzg commented Mar 3, 2024

@Codrax with this library it looks like I could have it watch for file changes. Would that be even better or still prefer/recommend a timer based approach?

@Codrax
Copy link
Author

Codrax commented Mar 4, 2024

@Codrax with this library it looks like I could have it watch for file changes. Would that be even better or still prefer/recommend a timer based approach?

Both cases would be great as long as the file reloads. I don't know a lot about that library, but I'm pretty sure the timer based approach is simpler as that just utilises the CPUs task scheduler, which I think is more optimised. But both options are valid.

@zarlo
Copy link

zarlo commented Apr 14, 2024

at lest for the fsnotify backend for linux the CPU over head is very little

@itzg
Copy link
Owner

itzg commented Apr 14, 2024

at lest for the fsnotify backend for linux the CPU over head is very little

Right. It's driven by existing filesystem OS events, so there's virtually no extra overhead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To do
Development

No branches or pull requests

3 participants