blob: 7f5cebff9a8b38b62e673c0b6b4d31471204556c [file] [log] [blame]
---
title: How Client Load Balancing Works
---
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
In a distributed system, servers can be added or removed and their capacity to service new client connections may vary. The server connectivity options are specified in the connection pool configuration.
The connection pool API supports connecting to servers through server locators or directly connecting to servers.
- **[Server Locators](about-server-locators.html)**
Server locators continuously monitor server availability and server load information. The client is configured with a list of server locators and consults a server locator to request a connection to a server in the distributed system.
- **[Connection Pools](about-connection-pools.html)**
Clients contain connection pools. Each region is associated with a connection pool using a region attribute, and operations on the region use connections from the respective pools.
- **[Discovering Locators Dynamically](discovering-locators-dynamically.html)**
A background thread periodically queries the locator for any other locators joining the distributed system.