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

unify Proxy set-up via ProxyConfiguration #101

Open
kra3 opened this issue Mar 6, 2021 · 2 comments
Open

unify Proxy set-up via ProxyConfiguration #101

kra3 opened this issue Mar 6, 2021 · 2 comments

Comments

@kra3
Copy link

kra3 commented Mar 6, 2021

http clients in aws sdk v2 implements a ProxyConfiguraion object which is consumed by SdkHttpClient to obtain proxy settings.

This library follows a different approach with withConnectionPoolSettings method.
What are your thoughts on unifying the behavior by having a proxyConfiguration method on the AkkaHttpClient.Builder.
AkkaHttpClient then have to handle creation of ConnectionPoolSettings with the ProxyConfiguraion

We may have to expose some of the ConnectionPoolSettings via AkkaHttpClient.Builder just like NettyNioAsyncHttpClient.Builder in the aws SDK in lie of loosing full access to the ConnectionPoolSettings

What are your thoughts on this?

@matsluni
Copy link
Owner

Hi @kra3, thanks for your idea to improve this library!

I did a little investigation and found that ProxyConfiguration is part of netty-nio-client. This makes it not easily possible to unify the proxy behaviour. I would rather not depend on netty-nio-client. One goal of this library is to not depend on netty.

Maybe there is a way to create an extension method on ProxyConfiguration to create an instance of ConnectionPoolSettings in your code base to more easily re-use it?!

Also, if ProxyConfiguration would be part of http-client-spi, then the ProxyConfiguration could be re-used by other http-implementations, like this one here.

@kra3
Copy link
Author

kra3 commented Mar 16, 2021

I did a little investigation and found that ProxyConfiguration is part of netty-nio-client

I think that you probably bumped into something in netty. However I was talking about ProxyConfiguration in aws-java-sdk.

That is, each sdkhttpclient has one associated proxy config & sdkhttpclient builder always takes a proxy config.
I would say aws sdk devs should have a base interface for all these proxy configs & not sure why they didn't.

Also, if ProxyConfiguration would be part of http-client-spi, then the ProxyConfiguration could be re-used by other http-implementations

I would say so too, at least for common proxy fields. Unfortunately aws sdk doesn't provide one; instead they opt to have a companion proxy config per http client.

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

2 participants