actix / actix/actix-web

[Windows] Web Client is unreasonably slow

オープン
#2,256 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
24.8k
フォーク
1.9k
平均マージ
23時間 10分
マージ済み PR(30日)
26

説明

Reproduce snippet:
```rust
#[actix_web::main]
async fn main() -> std::io::Result<()> {
let sys_time = std::time::SystemTime::now();
let start_time = sys_time.elapsed().unwrap();

let client = actix_web::client::Client::builder()
.connector(actix_web::client::Connector::new()
.timeout(Duration::from_secs(35))
.finish())
.timeout(Duration::from_secs(35))
.finish();

let response = client.get("https://google.com")
.send()
.await
.unwrap()
.body()
.await
.unwrap();
let end_time = sys_time.elapsed().unwrap();
let secs = end_time - start_time;
println!("{}", secs.as_secs());
return Ok(());
}
```

This code prints "20" on Windows, i.e. get request to Google takes 20 seconds.

Same code on Linux (WSL2) takes 0 seconds.

I don't have any clues what might be wrong, but perhaps it's related to DNS resolution?

`Cargo.toml`:
```toml
// ...

[dependencies]
actix-web = { version = "3", features = ["rustls"] }
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the Rust client code in the reproduction and the actix-web version 3 dependency in Cargo.toml. Run the snippet on Windows and Linux/WSL2, then investigate the request path and DNS-resolution hypothesis. Done means the same Google request no longer takes about 20 seconds on Windows and the behavior is covered by an appropriate regression test.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
networking
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。