Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Client - opensearch-py = “2.5.0”
AWS serverless = 2.0.x
Describe the issue:
Is the OpenSearch client with connection_class=Urllib3HttpConnection
thread-safe?
As part of adopting OpenSearch in our Python repository, we aim to verify whether the client configured with connection_class=Urllib3HttpConnection
is thread-safe. We have noted that perform_request
utilizes Urllib3’s connection pool, which is known to be thread-safe. However, we have found no additional documentation that clarifies this issue further.
Configuration:
OpenSearch(
hosts=[(host=host, port=port)],
http_auth=Urllib3AWSV4SignerAuth(credentials, AWS_REGION, "aoss"),
use_ssl=True,
verify_certs=True,
connection_class=Urllib3HttpConnection,
retry_on_timeout=True
)
Relevant Logs or Screenshots: