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

Hot reload of allow-list #73

Open
andrewzwaniga opened this issue Oct 19, 2021 · 0 comments
Open

Hot reload of allow-list #73

andrewzwaniga opened this issue Oct 19, 2021 · 0 comments

Comments

@andrewzwaniga
Copy link

I am maintaining an allow-list of subscribers using the --subscriber-whitelist command when running Comet as a daemon process. Currently, the only solution I know of for periodically updating this allow-list is to stop Comet and restart it with modified --subscriber-whitelist arguments -- but maybe I am not aware of a more elegant solution.

If none exists, it would be nice to have a command line option e.g. --hot-reload that will allow for periodic refreshing of the broker's allow-list. For example, reading in a list of IP address from a user-supplied text file or through an environment variable e.g. SUBSCRIBER_WHITELIST. Perhaps the --hot-reload can be supplemented with a timer for how often this happens. I appreciate that a reload could interfere with broadcasting events to subscribers.

From my understanding of how Comet works, naively I expect this is a tricky request. Perhaps an asynchronous task could periodically check some file or environment variable for the the allow-list and then pass it to Comet.

I am open to discuss and brainstorm this further. It would be a very useful feature for my broker since its allow-list is expanding all the time and my current restart protocol seems overly disruptive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant