Interface MultiClusterMXBean
public interface MultiClusterMXBean
The operational surface of a proxy, exposed over JMX.
It answers the questions asked during an incident - which cluster is taking writes, which clusters are healthy, where the traffic is going, how much work is owed to a cluster that is behind - and offers the two levers worth pulling by hand: move the active cluster, or fail over.
Deliberately typed in terms JMX renders without extra tooling (String, Map<String, ?>
of simple values), so jconsole and any monitoring agent can read it with no custom code.
-
Method Summary
Modifier and TypeMethodDescriptionvoidactivateCluster(String clusterName) Makes the named cluster active.voidactivateReadCluster(String clusterName) MovesREAD_ACTIVEreads to the named cluster, leaving the writes where they are.voidDrops the read pin, soREAD_ACTIVEreads follow the active cluster again.voidPromotes the next healthy cluster in failover order.The cluster mutations are applied to.Operations the cluster rejected on their own merits - not a health signal.Moving-average latency per cluster, in milliseconds.Cluster name to health state:HEALTHY,SUSPECTorUNHEALTHY.Mutations queued for later re-application, per cluster.longMutations discarded because the deferred queue was full.String[]Failover order: configured priorities first, then the rest.Operations that failed because the cluster was unavailable.getName()The proxy's configured name, which is also its JMX identity.Operations routed to each cluster, successful or not.intMutations still waiting to be applied somewhere.Operations rejected because the cluster was quiesced.The clusterREAD_ACTIVEreads go to - the active cluster unless reads are pinned elsewhere.String[]Every registered cluster, in registration order.How fan-out behaves inside a transaction.booleanisClusterHealthy(String clusterName) Pings the cluster and reports whether it answered.
-
Method Details
-
getName
String getName()The proxy's configured name, which is also its JMX identity. -
getActiveCluster
String getActiveCluster()The cluster mutations are applied to. -
getReadActiveCluster
String getReadActiveCluster()The clusterREAD_ACTIVEreads go to - the active cluster unless reads are pinned elsewhere. -
getRegisteredClusters
String[] getRegisteredClusters()Every registered cluster, in registration order. -
getFailoverOrder
String[] getFailoverOrder()Failover order: configured priorities first, then the rest. -
getWriteMode
String getWriteMode() -
getReadMode
String getReadMode() -
getFailoverPolicy
String getFailoverPolicy() -
getQuiescePolicy
String getQuiescePolicy() -
getTransactionPolicy
String getTransactionPolicy()How fan-out behaves inside a transaction. -
getClusterHealth
-
getOperations
-
getFailures
-
getApplicationErrors
-
getQuiesceRejections
-
getDeferredMutations
-
getAverageLatencyMillis
-
getPendingDeferredMutations
int getPendingDeferredMutations()Mutations still waiting to be applied somewhere. -
getDroppedDeferredMutations
long getDroppedDeferredMutations()Mutations discarded because the deferred queue was full. Anything above zero means a cluster is permanently missing data - this is the number to alert on. -
isClusterHealthy
Pings the cluster and reports whether it answered. -
activateCluster
Makes the named cluster active.Named
activateClusterrather thansetActiveClusteron purpose: JMX would pair the latter withgetActiveClusterinto a writable attribute, and an operator hunting for a lever looks under operations. -
activateReadCluster
MovesREAD_ACTIVEreads to the named cluster, leaving the writes where they are. -
clearReadCluster
void clearReadCluster()Drops the read pin, soREAD_ACTIVEreads follow the active cluster again. -
failoverToNextCluster
void failoverToNextCluster()Promotes the next healthy cluster in failover order.
-