-
Notifications
You must be signed in to change notification settings - Fork 158
Riak Java Client 2.0 FAQ
No. Version 2.0+ of the client only supports Riak's Protocol Buffers and Term-to-Binary encoding protocols.
Yes. To use it you can pass multiple node addresses to RiakClient and RiakCluster builders.
Yes, if provided multiple Riak nodes it will round-robin operations between them for load balancing and liveliness purposes.
Each client RiakNode object runs a HealthMonitoring thread that keeps track of significant events. If a node's behavior meets any of the following criteria, the client will remove the node from the load balancer's rotation until it is deemed safe.
- 5+ recently closed connections within 3 seconds
- 2+ consecutive failed connections
- 6+ consecutive failed operations
The node will be added back to the load balancer rotation when it passes a health check.
The default health check is a simple PingHealthCheck, which pings the server.
A StoreValueHealthCheck is also available, which will also test deeper into Riak, but at the expense of an additional operation on the database.
Users may also provide their own health check by implementing the HealthCheckFactory interface, and extending the HealthCheckDecoder class (see the StoreValueHealthCheck class for implementation details).