Table of Contents |
---|
Locator Connections
Locator connection have slightly different behavior from cache server connections. They still do the normal socket establishment, followed by protocol specification byte (110 for protobuf), followed by major version byte (currently 1), but there is currently no handshaking or authentication on locator connections. Additionally, a connection on a locator is only valid for a single protobuf message, the locator will close the connection after it sends back any response object.
GetAvailableServers
Description
Returns a list of servers, in the cluster, visible to the client.
Request
This request takes no parameters.
In version 1 of the protocol, locators are unable to maintain state on connections for round trip communication. They still need to start off their connection with a NewConnectionClientVersion to identify the connection as protobuf and specify the version, but this must be immediately followed by a locator request operation from below. If the locator is able to communicate with the given protocol version, it will handle the request operation, send the corresponding response, and then close the connection. If unable to communicate with the requested version, the locator will just close the connection.
...
GetServer
Description
Returns a Server to which the client may connect. You are allowed to exclude servers that you do not want the locator to consider and you may restrict the set of servers considered by the locator to a specific group. See "Using Member Groups" in Geode documentation.
Request
GetServerRequest | GetAvailableServersRequest|||||||||
Field Name | Data type | Description | Mandatory? | Repeated? | |||||
---|---|---|---|---|---|---|---|---|---|
excludedServers | Server | one or more servers that should not be considered by the locator as being suitable for the client | N | Y | |||||
serverGroup | String | tells the locator to limit its search to the set of servers in the given group | N | N |
Response
GetAvailableServersResponseGetServerResponse | ||||
Field Name | Data type | Description | Mandatory? | Repeated? |
---|---|---|---|---|
servers server | Server | A list of servers that are available in the cluster to connect to.server to which the client may connect | Y | Y |
Expected Behavior
- The locator will choose a server for the client to use in performing cache operations
- The locator will return a Server object that holds the coordinates of the server or it will return an error response if no server is available that matches the criteria in the GetServerRequest.Return a list of all available servers in the cluster that are visible to the client
Errors
Error Code | Error Definition | Error Description | |||
---|---|---|---|---|---|
101 | NO_AVAILABLE_SERVER | No suitable server could be found. If you excluded some servers you might want to retry without excluding them. |