Scary synchronous comment in AwsSdk2Transport

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

OpenSearch java library 2.8.1

Describe the issue:

We use AwsSdk2Transport and a NettyNioAsyncHttpClient to create an OpenSearchAsyncClient. After seeing some bad behaviour in our service we’re looking into possible causes. There’s a comment in the code above the constructor for AwsSdk2Transport which reads:

“Create an OpenSearchTransport with an asynchronous AWS HTTP client.
Note that asynchronous OpenSearch requests sent through this transport will be dispatched synchronously on the calling thread.”

Can someone explains what that means? I assume methods on the async client, returning CompletableFuture, are actually async?

Hey Wouter,
We are actually migrating our ES cluster to AWS OS, and I was looking to find the right client too. I don’t think NettyNioAsyncHttpClient is the right option when connecting to AWS OpenSearch cluster as that client is recommended to use if the AWS APIs requires HTTP/2: HTTP clients - AWS SDK for Java 2.x. openSearch-java don’t yet support HTTP/2. It will be released on opensearch-java v3.

.
We are thinking of using AwsCrtAsyncHttpClient because of that as our service has high throughput. But, before using AwsSdk2Transport, we were using ApacheHttpClient5Transport. That might also be an option. Please let me know what your thoughts are on it. Thank you!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.