-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Provide a thread-safe way to modify HttpClient proxies at runtime #8723
Comments
Best would be to deprecate @cowwoc want to prepare a PR? |
The suggestion from @sbordet is good, but I'm curious ... what is your use case that you need to modify the proxy list so often? |
@joakime My proxies are running on AWS spot instances. Spot instances are cheaper, but they can get terminated at any time. |
…ies at runtime.
…ies at runtime.
…ies at runtime.
…ies at runtime.
I've run into a bit of a snag. I was only planning to add My line of thinking is that that For now, I fixed |
…ies at runtime.
Jetty version(s)
11.0.12
Enhancement Description
HttpClient.getProxyConfiguration().getProxies()
is backed by aArrayList
which is not thread-safe.Currently, I am forced to externally lock each time I make an HTTP request, or modifying proxies. I am making thousands of requests per second, which means that I need to acquire a lock thousands of times per second.
Possible solutions:
ArrayList
byLinkedBlockingQueue
.The text was updated successfully, but these errors were encountered: