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 with hyper 1.0 #2323

Closed
1 task done
harryzcy opened this issue Nov 16, 2023 · 3 comments
Closed
1 task done

Graceful shutdown with hyper 1.0 #2323

harryzcy opened this issue Nov 16, 2023 · 3 comments

Comments

@harryzcy
Copy link

  • I have looked for existing issues (including closed) about this

Feature Request

Motivation

with_graceful_shutdown has been removed in hyper 1.0, not there's no convenient way to do this with axum::serve.

Proposal

Adds a with_graceful_shutdown to axum.

Alternatives

Provide an example to use hyper connections directly: hyperium/hyper#3303

@davidpdrsn
Copy link
Member

This is something that should go in https://github.com/hyperium/hyper-util and not axum. axum doesn't know anything about the underlying transport layer so it can't implement graceful shutdown.

Have a look through hyper's issues. There might already be one, otherwise you can file a new one.

Note that axum doesn't yet support hyper 1.0 at all.

@davidpdrsn davidpdrsn closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2023
@harryzcy
Copy link
Author

I'm tracking #1882. As hyper::Server is removed, axum::serve(listener, service) function confuses me and I initially thought the new API would provide a few more options.

This is something that should go in https://github.com/hyperium/hyper-util and not axum.

That would make sense, thanks.

@davidpdrsn
Copy link
Member

axum::serve(listener, service) function confuses me and I initially thought the new API would provide a few more options.

The purpose of axum::serve is to get you going quickly. Not to provide lots of configurations. That belongs in hyper-util so it can be used by other libraries (such as tonic)

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

2 participants