Modified: helix/site-content/0.8.3-docs/team-list.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/team-list.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/team-list.html (original) +++ helix/site-content/0.8.3-docs/team-list.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Team list
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_admin.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_admin.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_admin.html (original) +++ helix/site-content/0.8.3-docs/tutorial_admin.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Admin Operations
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_agent.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_agent.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_agent.html (original) +++ helix/site-content/0.8.3-docs/tutorial_agent.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Helix Agent
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_controller.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_controller.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_controller.html (original) +++ helix/site-content/0.8.3-docs/tutorial_controller.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Controller
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_health.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_health.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_health.html (original) +++ helix/site-content/0.8.3-docs/tutorial_health.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Customizing Heath Checks
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_messaging.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_messaging.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_messaging.html (original) +++ helix/site-content/0.8.3-docs/tutorial_messaging.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Messaging
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_participant.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_participant.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_participant.html (original) +++ helix/site-content/0.8.3-docs/tutorial_participant.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Participant
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_propstore.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_propstore.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_propstore.html (original) +++ helix/site-content/0.8.3-docs/tutorial_propstore.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Application Property Store
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_rebalance.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_rebalance.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_rebalance.html (original) +++ helix/site-content/0.8.3-docs/tutorial_rebalance.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Rebalancing Algorithms
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_rest_service.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_rest_service.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_rest_service.html (original) +++ helix/site-content/0.8.3-docs/tutorial_rest_service.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - REST Service 2.0
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_spectator.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_spectator.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_spectator.html (original) +++ helix/site-content/0.8.3-docs/tutorial_spectator.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Spectator
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_state.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_state.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_state.html (original) +++ helix/site-content/0.8.3-docs/tutorial_state.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - State Machine Configuration
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_task_framework.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_task_framework.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_task_framework.html (original) +++ helix/site-content/0.8.3-docs/tutorial_task_framework.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Task Framework
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_task_throttling.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_task_throttling.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_task_throttling.html (original) +++ helix/site-content/0.8.3-docs/tutorial_task_throttling.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Task Throttling
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_throttling.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_throttling.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_throttling.html (original) +++ helix/site-content/0.8.3-docs/tutorial_throttling.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Throttling
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_ui.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_ui.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_ui.html (original) +++ helix/site-content/0.8.3-docs/tutorial_ui.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - Helix UI Setup
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_user_content_store.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_user_content_store.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_user_content_store.html (original) +++ helix/site-content/0.8.3-docs/tutorial_user_content_store.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - User Defined Content Store for Tasks
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_user_def_rebalancer.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_user_def_rebalancer.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_user_def_rebalancer.html (original) +++ helix/site-content/0.8.3-docs/tutorial_user_def_rebalancer.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - User-Defined Rebalancing
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.3-docs/tutorial_yaml.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.3-docs/tutorial_yaml.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.3-docs/tutorial_yaml.html (original) +++ helix/site-content/0.8.3-docs/tutorial_yaml.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.3
  • /
  • Tutorial - YAML Cluster Setup
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.4-docs/Building.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.4-docs/Building.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.4-docs/Building.html (original) +++ helix/site-content/0.8.4-docs/Building.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.4
  • /
  • Build Instructions
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.4-docs/Features.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.4-docs/Features.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.4-docs/Features.html (original) +++ helix/site-content/0.8.4-docs/Features.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.4
  • /
  • Features
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.4-docs/Metrics.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.4-docs/Metrics.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.4-docs/Metrics.html (original) +++ helix/site-content/0.8.4-docs/Metrics.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.4
  • /
  • Helix Monitoring Metrics
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.4-docs/Quickstart.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.4-docs/Quickstart.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.4-docs/Quickstart.html (original) +++ helix/site-content/0.8.4-docs/Quickstart.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.4
  • /
  • Quickstart
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Modified: helix/site-content/0.8.4-docs/Tutorial.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.4-docs/Tutorial.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.4-docs/Tutorial.html (original) +++ helix/site-content/0.8.4-docs/Tutorial.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.4
  • /
  • Tutorial
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • Added: helix/site-content/0.8.4-docs/auto_exit_maintenance.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.4-docs/auto_exit_maintenance.html?rev=1854951&view=auto ============================================================================== --- helix/site-content/0.8.4-docs/auto_exit_maintenance.html (added) +++ helix/site-content/0.8.4-docs/auto_exit_maintenance.html Wed Mar 6 22:50:55 2019 @@ -0,0 +1,388 @@ + + + + + + + + Apache Helix - Auto-exit of Maintenance Mode + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    + +
    +
    + +
    +
    +
    +
    + + +
    +

    Introduction

    +

    Intro Auto-exit of maintenance mode is a feature addition to Helix. It concerns a feature that allows clusters to switch out of maintenance mode automatically to save operational costs and to improve availability.

    +
    +
    +

    Background

    +
    +

    Maintenance Mode

    +

    The maintenance mode in Helix refers to a Helix cluster state where the Helix Controller will not trigger any type of rebalance. In short, if a cluster is in maintenance, the Controller will not bootstrap any new partitions. However, this does not mean that there won’t be any (upward) state transitions. For example, partitions missing a top-state (e.g. MASTER/LEADER) replica will get a state transition in order to fill in the void for a top-state replica.

    +
    +

    Possible Scenarios

    +

    There are two possible conditions under which a cluster will go into maintenance mode automatically.

    +
      +
    1. There are more offline/disabled instances than ClusterConfig’s MAX_OFFLINE_INSTANCES_ALLOWED.
    2. +
    3. There exist instances that have more partitions than ClusterConfig’s MAX_PARTITIONS_PER_INSTANCE.
    4. +
    +

    Difficulty in Manually Exiting Maintenance Mode

    +

    Although maintenance mode has been designed to prevent a large-scale reshuffling of replicas when there are intermittent, transient Participant connection issues. When in maintenance, no new partitions will be bootstrapped, which will block many native operations such as creation of stores/DBs. Currently, in order to unblock, an operator must manually disable maintenance mode via Helix REST API. Since it’s difficult to predict when temporary disconnects will happen, it has been a challenge to address them in a prompt manner.

    +
    +
    +
    +
    +

    Problem Statement

    +

    Currently, once clusters enter maintenance mode automatically, exiting must be done manually. This is an added human effort. We want a feature to automate this to reduce downtime and increase availability.

    +
    +
    +

    Architecture/Implementation

    +
    +

    Maintenance Recovery Threshold

    +

    Recall that there are two cases in which a cluster may enter maintenance mode automatically:

    +
    +
      +
    1. There are more offline/disabled instances than ClusterConfig’s MAX_OFFLINE_INSTANCES_ALLOWED.
    2. +
    3. There exist instances that have more partitions than ClusterConfig’s MAX_PARTITIONS_PER_INSTANCE.
    4. +
    +
    +

    It is important to note that we are mainly concerned with Case 1. Case 2 is meant to be a sanity check against Helix’s CRUSH-ed rebalance algorithm, and this has little to do with the original motivation behind cluster maintenance mode. So, although we will still check against Case 2 when determining whether it is safe to exit maintenance mode, we will only address Case 1 in this section.

    +

    With that said, it is not hard to imagine a cluster in production experiencing a flip-flop behavior around the exact value of ClusterConfig’s MAX_OFFLINE_INSTANCES_ALLOWED field. Such behavior is undesirable and may defeat the purpose of using this feature. To mitigate it in design is to have a separate, more strict threshold for recovering out of maintenance mode. We therefore propose to add a new field, MAINTENANCE_RECOVERY_THRESHOLD. MAINTENANCE_RECOVERY_THRESHOLD will be defined by the user and hold a more conservative value than **MAX_OFFLINEINSTANCESALLOWED** to allow for some wiggle room in deciding what value is enough to call a cluster “sufficiently recovered”. Additionally, we will also give users the flexibility to “opt-out” of the auto-exit feature by treating a MAINTENANCE_RECOVERY_THRESHOLD value of -1 as a disable signal.

    +

    In short,

    +
      +
    • If NumOfflineDisabledInstances < NUM_OFFLINE_INSTANCES_FOR_AUTO_EXIT, exit maintenance mode
    • +
    • NUM_OFFLINE_INSTANCES_FOR_AUTO_EXIT <= MAX_OFFLINE_INSTANCES_ALLOWED
    • +
    • NUM_OFFLINE_INSTANCES_FOR_AUTO_EXIT < 0 or not set → Opt-out of auto-exiting of maintenance mode
    • +
    +
    +
    +

    Additional Fields in MaintenanceSignal

    +

    Currently, Helix stores the maintenance signal in /{CLUSTER_NAME}/CONTROLLER/MAINTENANCE. A sample maintenance signal ZNode will look like the following:

    +
    +
    {
    +  "id" : "maintenance",
    +  "simpleFields" : {
    +    "REASON" : "Offline Instances count 5 greater than allowed count 4. Stop rebalance and put the cluster CLUSTER_TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit into maintenance mode.",
    +    "TRIGGERED_BY" : "CONTROLLER",
    +    "TIMESTAMP" : "12312838831***",
    +    // The following are sample user-defined fields from the REST call payload //
    +    "id" : "hulee",
    +    "jira" : "HELIX-123",
    +    "cluster" : "testCluster"
    +  },
    +  "listFields" : {
    +  },
    +  "mapFields" : {
    +  }
    +}
    +
    +
    +

    A simpleField will be newly added (notice the “TRIGGERED_BY” field) to denote whether the current maintenance signal has been generated automatically by the Controller. There will initially be two possible entries for this field:

    +
      +
    • CONTROLLER
    • +
    • USER
    • +
    +

    Also, the TIMESTAMP field will be added so that the value could be retrieved via REST.

    +

    In addition, we will allow addition of custom fields in simpleFields. See the example above. Users will be able to add these fields by using the REST endpoints that will be provided when enabling the maintenance mode. Note that when disabling maintenance mode, these fields will no longer be available because disabling maintenance mode will remove the maintenance signal altogether.

    +
    +
    +

    Recording Maintenance History

    +

    Currently, Helix maintains the controller history in the /{clusterName}/CONTROLLER/HISTORY ZNode. We plan to add a history for maintenance mode. This way, users will be able to access the history in ZooKeeper directly, or utilize the REST endpoint for viewing. The format will be in a human-readable format like the following (this is how Helix maintains the Controller leader history):

    +
    +
    long currentTime = System.currentTimeMillis();
    +DateFormat df = new SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
    +df.setTimeZone(TimeZone.getTimeZone("UTC"));
    +String dateTime = df.format(new Date(currentTime));
    +
    +
    +

    Note that Helix only records 10 most recent changes in the HISTORY ZNode. We will follow a similar protocol for persisting maintenance mode-related history. Note that all changes around maintenance mode will be recorded (both entering and exiting of the mode).

    +
    +
    +

    Backward Compatibility

    +

    Old versions of Helix Controllers will not refer to the newly-added fields, in which case they will simply lack the auto-exit functionality.

    +
    +
    +

    Asynchronous Processing

    +

    Note that in order for a cluster to exit maintenance mode, the Controller must check against all conditions that are outlined above. That is, it needs to make sure 1) the total count of offline/disabled instances is less than the threshold and that 2) there are no instances with more partitions than the threshold. Checking against Condition 2 requires traversing all resources’ states, which could be costly in clusters of large scale. From this, we potentially risk adding a significant latency to the pipeline, which is undesirable because it could cause problems regarding availability (for example, longer pipeline runs may exacerbate the rate at which ZooKeeper Event Callbacks accumulate. Helix currently deals with a large number of ZK Event Callbacks by re-booting the Controller, which could nick Helix’s as well as applications’ availability numbers).

    +

    For this reason, we will make the checks happen asynchronously. Additional tweak may be required to ensure that the maintenance signal is cached appropriately through each run of the pipeline to avoid the race condition.

    +
    +
    +

    Periodic Check on Cluster Recovery Status

    +

    Auto-exit is inherently triggered as part of Helix’s rebalance pipeline; that is, if there is no rebalance triggered, there wouldn’t be any auto-exits triggered either. In theory, this is a non-issue because whether a cluster goes into or recovers out of maintenance mode is determined by changes around LiveInstances, and a LiveInstance change is an event that triggers Helix’s rebalance pipeline.

    +

    Regardless, there has been anecdotal reports where such events seemed to have been “swallowed” or “disappeared” - if that is true for any reason (mostly a ZK callback queue issue), one way to mitigate it is to enable periodically-triggered rebalances. Note that this is actually a feature already supported by Helix.

    +
    +
    +
    +

    How to Use the Auto-Exit Feature

    +
    +

    Why Use Auto-Exit

    +

    Helix is used to manage resources in distributed clusters; therefore, it inevitably gets to have hundreds of instances. With so many clusters and traffic to the ZooKeeper, Helix’s metadata store, there are cases in which some Participants in the cluster experience transient connection failure, which may cause Helix to respond to each little change that happens to the cluster. For users of stateful systems, this may be undesirable, so they opt to set a config for entering maintenance mode automatically. Maintenance mode is a temporary mode that the cluster can enter in order to ensure that there are no bootstrapping state transitions on instances.

    +

    However, no bootstrapping state transitions could mean that some operations such as addition of resources would be halted, which causes periods of unavailability. It was the cluster operator’s responsibility to determine whether the given cluster has sufficiently recovered enough to exit maintenance mode. The auto-exit feature removes such overhead.

    +
    +
    +

    Guide

    +

    First, we encourage all users of this feature to understand Helix’s workflow below:

    +

    Intro

    +

    In order to use this feature, you’d need to set the following config parameters in your cluster’s ClusterConfig.

    +
    +

    Auto-enter maintenance mode

    +

    MAX_OFFLINE_INSTANCES_ALLOWED: the number of offline and disabled instances allowed before the cluster automatically enters maintenance mode.

    +

    MAX_PARTITIONS_PER_INSTANCE: the number of partitions on any given instance, where, if any instance in the cluster happens to have more partitions than this number, the cluster automatically enters maintenance mode

    +
    +
    +

    Auto-exit maintenance mode

    +

    NUM_OFFLINE_INSTANCES_FOR_AUTO_EXIT: set this value to allow your cluster to auto-exit when the number of offline and disabled instances are at this value. Note that this value must be less than MAX_OFFLINE_INSTANCES_ALLOWED (Read the design above on why). Note that the appropriate value for this is dependent on the characteristics of the cluster. In general, start with 1, meaning that the cluster will only auto-exit maintenance mode when it is down to 1 offline or disable instance, and increase the value as you increase tolerance.

    +

    Note that the cluster will auto-exit only if it has automatically entered maintenance mode previously.

    +
    +
    +
    +
    +

    FAQ

    +
    +
    + +
      +
    • If you are using DelayedAutoRebalancer for your clusters, this auto-exit feature would still work as expected. Fundamentally, DelayedAutoRebalancer and maintenance mode are mutually independent. That is, under maintenance mode, Helix uses a different rebalancing strategy. Once the cluster auto-exits maintenance mode, it will go back to whichever rebalancing mode it was on previously.
    • +
    • Delayed Partition Movement is a feature in Helix’s FULL-AUTO rebalancer.
    • +
    • The rebalance delay will work at the instance level and entering/exiting maintenance mode will not affect the time at which the delay-counting started.
    • +
    +
    +
    +

    How do I know what the appropriate value is for ****MAINTENANCE_RECOVERY_THRESHOLD****?

    +
      +
    • As a framework, we cannot provide the right value for this threshold. It should depend on the nature of the application and the risk tolerance thereof. Familiarize yourself with the rules outlined above and start with a low value (for example, 0) and increase your tolerance.
    • +
    +
    +
    +
    +
    +
    +
    +
    + +
    + + + + +
    +
    +
    +

    Back to top

    + +

    Reflow Maven skin by Andrius Velykis.

    + +
    +
    Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation. + All other marks mentioned may be trademarks or registered trademarks of their respective owners.
    + Privacy Policy +
    +
    +
    + + + + + + + + + + + + + + + + + + \ No newline at end of file Modified: helix/site-content/0.8.4-docs/dependencies.html URL: http://svn.apache.org/viewvc/helix/site-content/0.8.4-docs/dependencies.html?rev=1854951&r1=1854950&r2=1854951&view=diff ============================================================================== --- helix/site-content/0.8.4-docs/dependencies.html (original) +++ helix/site-content/0.8.4-docs/dependencies.html Wed Mar 6 22:50:55 2019 @@ -1,7 +1,7 @@ @@ -109,7 +109,7 @@
  • Release 0.8.4
  • /
  • Project Dependencies
  • -
  • Last Published: 2019-02-26
  • +
  • Last Published: 2019-03-06
  • @@ -249,7 +249,7 @@

    Dependency Tree