Skip to content

Is hyper Server utilize threads? #3016

Answered by seanmonstar
BratSinot asked this question in Q&A
Discussion options

You must be logged in to vote

If you're using hyper::Server, it will spawn a task for each connection.

If you're using hyper::server::conn::Http combined with your own socket listener, then you could spawn each HTTP connection into a task.

The runtime (such as Tokio) will use multiplex the tasks across the amount of threads you've configured it to use (Tokio will use the same amount of threads as CPUs if you didn't specify otherwise).

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@seanmonstar
Comment options

@BratSinot
Comment options

@BratSinot
Comment options

@seanmonstar
Comment options

@BratSinot
Comment options

Answer selected by BratSinot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants