Skip to content
New issue

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

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

Already on GitHub? # to your account

Feature Request: Dynamic updating of config file #64

Closed
benbullnz opened this issue Aug 23, 2020 · 6 comments
Closed

Feature Request: Dynamic updating of config file #64

benbullnz opened this issue Aug 23, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@benbullnz
Copy link

Hi,

I'm wondering if it would be possible to allow updating of the configuration file while the server is running?
I have a use case where I need to run multiple (proxy) server instances on different VM's. These all operate from the same config file (which is copied to each server instance) and then the proxy server array sits below a load balancer. Any subscribe request made to the load balancer is divided up amongst the attached proxy servers. This works well.

At the moment I edit the the config file on a file storage server and it is then downloaded from the central file storage to each VM as part of the rtsp-simple-server startup script. If I need to add a path to the config file, I must edit it on the file server and then restart the script which gets the latest config file and starts rtsp-simple-server.
Obviously this is fine when no one is connected the proxy servers but if other streams are active then I must kill the server/kick the clients in order to restart the server with the next updated config file.

Would it be possible to implement regular checking of the config file for changes while the server is running?

Maybe this is related to or resolved by the wildcard path project which you are working on?

Any suggestions would be appreciated.
Thanks

@aler9 aler9 added the enhancement New feature or request label Aug 29, 2020
@aler9
Copy link
Member

aler9 commented Aug 29, 2020

Hello, this has been requested multiple times and will be added soon. Two approaches have been proposed:

  • using an HTTP REST API to update the configuration, but i think it's redundant
  • allow hot reloading of the configuration, by sending the software a system signal (SIGUSR1); after receiving the signal, the software reloads the configuration, finds out the changes and applies them without touching the unchanged parts

@benbullnz
Copy link
Author

That sounds great - thanks.

I'd be supportive of a REST API but also wouldn't be too hard to integrate the system signal into an API to do the same thing if you don't choose to implement the API.

Cheers.

@aler9
Copy link
Member

aler9 commented Oct 24, 2020

Dynamic update has been implemented and merged to master; it works by detecting writings to the configuration file.
A new version will be released after extensive tests.

@aler9
Copy link
Member

aler9 commented Oct 28, 2020

added in v0.11.0

@aler9 aler9 closed this as completed Oct 28, 2020
@benbullnz
Copy link
Author

Again, thanks very much.
This works great and is exactly what was needed.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2023

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants