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

Improve life-cycle management of web proxy server #3

Closed
dsilhavy opened this issue Aug 25, 2022 · 3 comments · Fixed by #32
Closed

Improve life-cycle management of web proxy server #3

dsilhavy opened this issue Aug 25, 2022 · 3 comments · Fixed by #32
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dsilhavy
Copy link
Contributor

dsilhavy commented Aug 25, 2022

Feature description

Extending #14, maintain a watchdog to restart it after a crash or if the configuration changes.

Relevant specifications and corresponding sections

See #1

GanttLab

GanttStart: 2022-09-19
GanttDue: 2022-09-26

@dsilhavy dsilhavy added this to the MWC23 milestone Aug 26, 2022
@dsilhavy dsilhavy changed the title Support for hosting of static content Hosting/Endpoints based on Content Hosting Configuration Aug 26, 2022
@dsilhavy dsilhavy modified the milestone: MWC23 Aug 26, 2022
@davidjwbbc davidjwbbc changed the title Hosting/Endpoints based on Content Hosting Configuration Improve life-cycle management of web proxy server Sep 20, 2022
@davidjwbbc davidjwbbc self-assigned this Sep 20, 2022
@davidjwbbc davidjwbbc moved this from Backlog to In Progress in 5GMS: Basic media stream handling (MVP#1) Sep 20, 2022
@rjb1000 rjb1000 moved this from In Progress to Todo in 5GMS: Basic media stream handling (MVP#1) Sep 30, 2022
@rjb1000 rjb1000 moved this from Todo to In Progress in 5GMS: Basic media stream handling (MVP#1) Sep 30, 2022
@davidjwbbc
Copy link
Contributor

davidjwbbc commented Oct 6, 2022

Have implemented process restarting logic (failure in event of rapid restarts). Have yet to implement the configuration reloading logic. This could be done either as:

  1. Reload the AS configuration and ContentHostingConfiguration file, restart nginx.
  2. Reload the AS configuration and ContentHostingConfiguration files if they've changed, restart nginx if any changes.
  3. Reload the AS configuration and ContentHostingConfiguration files if they've changed, restart nginx if changes affect the nginx configuration.
  4. Reload the AS configuration and ContentHostingConfiguration files if they've changed, choose restart of reload of nginx dependant on what has changed in nginx configuration.

@rjb1000
Copy link
Contributor

rjb1000 commented Oct 6, 2022

After discussion, we decided that option 1 is too blunt.

I think for MVP#1, option 2 is good enough.

Options 3 and 4 are nicer, of course, but represent gold plating that can't be justified at this point.

@rjb1000
Copy link
Contributor

rjb1000 commented Oct 6, 2022

As for the mechanism used the restart nginx: there is a brute force restart that unceremoniously terminates existing client connections and a graceful restart that hands over to a new process.

For the purposes of MVP#1, the brute force restart is good enough. We may revisit this later to make it more graceful.

davidjwbbc added a commit to davidjwbbc/rt-5gms-application-server that referenced this issue Oct 6, 2022
Closes 5G-MAG#3

Uses the python 3 asyncio module to make lifecycle management more event
driven. Adds signal handlers for INT and QUIT signals to terminate the process
nicely. Adds a signal handler for HUP to cause a configuration reload and to
trigger a reload/restart of the web proxy daemon.
@davidjwbbc davidjwbbc moved this from In Progress to Ready for review in 5GMS: Basic media stream handling (MVP#1) Oct 6, 2022
rjb1000 pushed a commit that referenced this issue Oct 6, 2022
Closes #3

Uses the python 3 asyncio module to make lifecycle management more event
driven. Adds signal handlers for INT and QUIT signals to terminate the process
nicely. Adds a signal handler for HUP to cause a configuration reload and to
trigger a reload/restart of the web proxy daemon.
Repository owner moved this from Ready for review to Done in 5GMS: Basic media stream handling (MVP#1) Oct 6, 2022
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
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants