Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get cluster status #108

Closed
courtneycouch opened this issue Jan 29, 2016 · 2 comments
Closed

Get cluster status #108

courtneycouch opened this issue Jan 29, 2016 · 2 comments
Milestone

Comments

@courtneycouch
Copy link

Is there a way to retrieve the current cluster status (number of nodes connected, and any other data about the current state) ? The info command goes to the server and isn't quite what I'm looking for. Just the current state of the client connections. I'd love to be able to see if some (or all) AS instances become unavailable to the client library in order to proactively deal with that without relying on having to make a call just to see if an error is thrown.

Something similar to node_redis client.connected

Quickly browsing the source there doesn't seem to be any way to handle this.

Less important but also it would be nice if it was possible to have an ability to listen for lifecycle events in connections to Aerospike (again comparing with node_redis, something like the events: error, reconnecting, end etc).

Maybe getting the current status without making an actual call to the Aerospike server is possible already but I missed it.

@jhecking
Copy link
Contributor

jhecking commented Feb 1, 2016

At the moment there is unfortunately no way to get information about the cluster status from the Aerospike Node.js client without sending a request to one or more of the cluster's nodes. The C client library, which the Node.js client uses internally, does support a aerospike_cluster_is_connected method, but it's not exposed in the JS interface of the client.

@jhecking jhecking added this to the v2.0.0 milestone Mar 28, 2016
@jhecking
Copy link
Contributor

I will be adding an isConnected method to the Client interface in the upcoming v2 release. This method checks the health of the client connections and will return false if none of the server connections are currently alive.

@jhecking jhecking reopened this Mar 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants