IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
sniffingConnectionPool
editsniffingConnectionPool
editUnlike the two previous static connection pools, this one is dynamic. The user provides a seed list of hosts, which the client uses to "sniff" and discover the rest of the cluster. It achieves this through the Cluster State API. As new nodes are added or removed from the cluster, the client will update it’s pool of active connections.
To use the SniffingConnectionPool
:
$client = ClientBuilder::create() ->setConnectionPool('\Elasticsearch\ConnectionPool\SniffingConnectionPool', []) ->build();
Note that the implementation is specified via a namespace path to the class.