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

Graceful Shutdown for HTTP Server #8

Closed
vidhvath28 opened this issue Oct 2, 2024 · 10 comments
Closed

Graceful Shutdown for HTTP Server #8

vidhvath28 opened this issue Oct 2, 2024 · 10 comments

Comments

@vidhvath28
Copy link
Contributor

The current load balancer implementation lacks a graceful shutdown mechanism. This means that when the server receives termination signals (e.g., SIGINT or SIGTERM), it immediately stops processing new and ongoing requests, potentially leading to incomplete requests and loss of data. Implementing a graceful shutdown allows the server to stop accepting new requests, while still completing ongoing requests before shutting down. This ensures a smooth shutdown process and improves reliability during server restarts or deployments.

Copy link

github-actions bot commented Oct 2, 2024

👋 Thank you for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!

@vidhvath28
Copy link
Contributor Author

I would like to work on this issue , kindly assign this issue to me .

@vidhvath28
Copy link
Contributor Author

@muruga21
My approach for this issue :-

  1. Add a channel to listen for termination signals.
  2. Implement the graceful shutdown logic by calling server.Shutdown() in response to termination signals.
  3. Ensure that the shutdown process waits for all in-flight requests to complete.

@toastsandwich
Copy link
Contributor

Nice find @vidhvath28, cant believe i missed it !!

@vidhvath28
Copy link
Contributor Author

I have resolved the error and submitted a PR #9 , kindly please check it and consider this PR for Hacktoberfest and GSsoC by tagging it with hacktoberfest-accepted and gssoc-ext.

@toastsandwich
Copy link
Contributor

toastsandwich commented Oct 2, 2024

I am a contributor for this repo too, @muruga21 please look into this.

@vidhvath28
Copy link
Contributor Author

@toastsandwich just few minutes back I have fixed the issue and submitted an PR for it

@vidhvath28
Copy link
Contributor Author

@toastsandwich can you please consider this PR for Hacktoberfest and GSsoC by tagging it with hacktoberfest-accepted and gssoc-ext.

@toastsandwich
Copy link
Contributor

@vidhvath28 i am just contributor here, i am not project admin and for hacktober there must be tag added in repository as hacktober

@muruga21
Copy link
Owner

muruga21 commented Oct 3, 2024

@vidhvath28 Great work man..!

@muruga21 muruga21 closed this as completed Oct 3, 2024
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

3 participants