Can i do the programmable reblancing in the web app?
You can programmatically kick off rebalance through the REST API: http://docs.couchbase.com/admin/admin/REST/rest-cluster-rebalance.html
CLI is another option that allow you to do this through the command line.
This is not what i want , I hope that doing the reblance can be automated in app sensitively when one of nodes down ,and auto failover ending.
Can i do it?
You essentially want auto-failover to be followed by rebalance at all times, is that right?
When a node fails, do you not expect the failed node to come back?
no, i hope i do reblance after the node down and successful auto-failover in order to avoid the exception ’ com.couchbase.client.core.ReplicaNotConfiguredException: Replica number 2 not available for bucket price_datapool’
There is no auto-magic way to kick off rebalance after a failover. However you can kick it off when and if you get the exception in your app. However it is important to note that rebalance is a long running operation and you will continue to see the exception until the rebalance completes.
But if i don’t do the reblance, the mutation operation in java sdk slows down a lot . It leads to the situation that 1000 items loaded need nearly 1 hour.
What can I use to do the remote reblance in java sdk?