You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if there are more than one connections, then the number of requests per second increases by 3 times. I run in single-threaded mode. I don't understand how this is possible
Nothing like this is observed with other servers - if it is run in single-threaded mode, then there is no increase in requests per second from an increase in the number of connections
Do you have explanation for this effect?
Server code:
#[tokio::main(flavor = "current_thread")]
async fn main() {
let addr = ([127, 0, 0, 1], 3000).into();
let make_svc = make_service_fn(|_conn| {
async { Ok::<_, Infallible>(service_fn(handle_request)) }
});
let server = Server::bind(&addr)
.serve(make_svc)
.with_graceful_shutdown(async {
tokio::signal::ctrl_c().await.ok();
});
if let Err(e) = server.await {
eprintln!("{}", e);
}
}
Activity