Closed jr981008 closed 2 years ago
can you reformat the code in the issue with code fences to make it readable ?
oh sorry, code example has been updated.
that's expected, the pool is per host, if proxy would be taken in account then the same host could have more connections than expected.
I think we shouldn't have added a proxy option setting on RequestOptions and instead only kept it at the HttpClient level, because it leads to such unexpectations.
Thanks your answer or any help. I understand , we can't allow too many connections between the client and the proxy server, but this brings three problems. 1.The request can be set up as a proxy, but the proxy can only be set once for an address, which is ambiguous.
thanks @jr981008 you convinced me to use the proxy address as being part o the pool key
Are there any plans for this? For the time being, we may need to find an alternative, similar to AsyncHttpClient, I will migrate back when vertx supports it.
I think it can be done in the next 4.3.4 release as it does not sound too difficult.
Questions
vert x 4.x has request-level proxy, but when replacing proxy ip hots for same target url, it seems that https only uses target server hosts .ip for connection pool select, http use target server hosts .ip and proxy sever host .ip .Why is there such diffrence for http . https proxy? It seems that it becomes impossible to modify the proxy server for same target url (https) before the httpclient is rebuild.
for example: request https://www.example.com with proxy 127.0.0.1:8081 get ok shutdown 8081 proxy . startup proxysever at port 8082. request https://www.example.com with proxy 127.0.0.1:8082 get fail, beacuse httpclient still use 8081 proxy server config。
set proxy use request-level
test Code:
Version
4.3.3 It seems that this code affects the handling of http and https vertx-core-4.3.3-sources.jar!/io/vertx/core/http/impl/HttpClientImpl.java:574