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

我想要知道 httpx 的 proxies 底层设计原理,为什么可以达到 90% 的成功率,而 requests 只有 20% 成功率 #3474

Closed
wjsw1781 opened this issue Jan 15, 2025 · 3 comments

Comments

@wjsw1781
Copy link

psf/requests#6871

@wjsw1781 wjsw1781 changed the title 我想要知道 httpx 的 proxies 底层设计原理,为什么可以达到 90% 的成功率,而 requests 我想要知道 httpx 的 proxies 底层设计原理,为什么可以达到 90% 的成功率,而 requests 只有 20% 成功率 Jan 15, 2025
@wjsw1781
Copy link
Author

I want to know whether, when using a proxy, the DNS resolution process in httpx is also handled by the proxy server or if it follows the system's own DNS requests. Similarly, with 300 overseas URLs, after using a proxy, httpx can achieve a 90% success rate, while requests only has a 20% success rate. I feel that the proxy handling in httpx must be better designed than in requests. Please inform me about the logic behind this so that I can optimize the requests project!

@wjsw1781
Copy link
Author

"Since our project heavily uses requests, it would take a long time to migrate to httpx at this stage. Therefore, I want to quickly understand the optimization points of httpx over requests in terms of proxies."

@wjsw1781
Copy link
Author

我已经知道了原因 httpx 本身属于阉割的 dns 能力,默认都是远程 dns 解析

requests 好歹对本地和远程进行了拆分

感谢这个苦 虽然我目前没有办法迁移成 httpx 未来一定要想 httpx 迁移

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

1 participant