feat: Added pool_maxsize for RequestsHttpConnection (#216)

Signed-off-by: Niket Singh <singhnik82@gmail.com>

Signed-off-by: Niket Singh <singhnik82@gmail.com>
Co-authored-by: Niket Singh <niket.singh@dailyrounds.org>
Co-authored-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
This commit is contained in:
Neckbuster
2022-12-02 00:54:59 +05:30
committed by GitHub
parent d6e994a411
commit b6b35f4666
3 changed files with 21 additions and 6 deletions
+9 -6
View File
@@ -1,6 +1,6 @@
- [Getting started with the OpenSearch Python client](#getting-started-with-the-opensearch-python-client)
- [User guide of OpenSearch Python Client](#user-guide-of-opensearch-python-client)
- [Setup](#setup)
- [Sample code](#sample-code)
- [Example](#example)
- [Creating a client](#creating-a-client)
- [Creating an index](#creating-an-index)
- [Adding a document to an index](#adding-a-document-to-an-index)
@@ -9,8 +9,8 @@
- [Searching for a document](#searching-for-a-document)
- [Deleting a document](#deleting-a-document)
- [Deleting an index](#deleting-an-index)
- [Making API calls](#making-api-calls)
- [Point in time API](#point-in-time-api-calls)
- [Making API Calls](#making-api-calls)
- [Point in Time API](#point-in-time-api)
- [Using plugins](#using-plugins)
- [Alerting plugin](#alerting-plugin)
- [**Searching for monitors**](#searching-for-monitors)
@@ -390,7 +390,9 @@ Refer the AWS documentation regarding usage of IAM credentials to sign requests
Opensearch-py client library also provides an in-house IAM based authentication feature, `AWSV4SignerAuth` that will help users to connect to their opensearch clusters by making use of IAM roles.
##### Pre-requisites to use `AWSV4SignerAuth`
`AWSV4SignerAuth` uses RequestHttpConnection as transport class for communication with opensearch clusters. Opensearch-py client library provides `pool_maxsize` option to modify default connection-pool size.
#### Pre-requisites to use `AWSV4SignerAuth`
- Python version 3.6 or above,
- Install [botocore](https://pypi.org/project/botocore/) using pip
@@ -413,7 +415,8 @@ client = OpenSearch(
http_auth = auth,
use_ssl = True,
verify_certs = True,
connection_class = RequestsHttpConnection
connection_class = RequestsHttpConnection,
pool_maxsize = 20
)
q = 'miller'