nodetool pausehandoff
Pauses the delivery of hints to recovering nodes.
Synopsis
Section titled “Synopsis”nodetool [connection_options] pausehandoffSee connection options for connection options.
Description
Section titled “Description”nodetool pausehandoff temporarily stops the delivery of stored hints to their target nodes. Unlike disablehandoff, this command does not prevent new hints from being stored—it only pauses the replay of existing hints.
This is useful when hint delivery is causing performance issues on recovering nodes or when controlled hint replay timing is needed.
Pause vs Disable
- pausehandoff: Stops hint delivery only. New hints continue to be stored.
- disablehandoff: Stops both hint storage AND delivery.
Behavior
Section titled “Behavior”When hint delivery is paused:
- New hints continue to be stored for unavailable replicas
- Existing hints are NOT delivered to recovered nodes
- Hints accumulate until delivery is resumed
- Hint expiration continues (hints may expire before delivery)
What Continues
Section titled “What Continues”| Feature | Status |
|---|---|
| New hint storage | Continues normally |
| Gossip | Continues normally |
| Writes | Continue normally |
| Read repairs | Continue normally |
What Stops
Section titled “What Stops”| Feature | Status |
|---|---|
| Hint delivery | Paused |
| Automatic consistency restoration | Suspended |
| Hint replay to recovered nodes | Stopped |
Examples
Section titled “Examples”Basic Usage
Section titled “Basic Usage”nodetool pausehandoffPause and Verify
Section titled “Pause and Verify”nodetool pausehandoff
# Check hint delivery threadsnodetool tpstats | grep -i hintWhen to Use
Section titled “When to Use”Recovering Node Under Stress
Section titled “Recovering Node Under Stress”When a recovering node is overwhelmed by hint replay:
# 1. Pause hint deliverynodetool pausehandoff
# 2. Let the node stabilize# Monitor: nodetool tpstats
# 3. Resume when readynodetool resumehandoffControlled Recovery Timing
Section titled “Controlled Recovery Timing”When needing to control when hints are delivered:
# Pause during peak hoursnodetool pausehandoff
# Resume during maintenance window# (later)nodetool resumehandoffTroubleshooting Hint Storms
Section titled “Troubleshooting Hint Storms”When investigating hint-related performance issues:
# 1. Check hint delivery activitynodetool tpstats | grep -i hint
# 2. Pause if hint delivery is causing issuesnodetool pausehandoff
# 3. Investigatenodetool listpendinghints
# 4. Resume when resolvednodetool resumehandoffDuring Node Maintenance
Section titled “During Node Maintenance”Prevent hint delivery to a node under maintenance:
# On coordinator nodes, pause hint deliverynodetool pausehandoff
# Perform maintenance on target node# ...
# Resume after maintenancenodetool resumehandoffImpact Assessment
Section titled “Impact Assessment”Immediate Effects
Section titled “Immediate Effects”| Aspect | Impact |
|---|---|
| Hint delivery | Stops immediately |
| Coordinator load | May increase (hints accumulate) |
| Target node load | Decreases (no hint replay) |
| Disk usage | Hints continue accumulating |
Consistency Implications
Section titled “Consistency Implications”| Scenario | With Delivery | With Paused Delivery |
|---|---|---|
| Node recovers | Hints replayed immediately | Hints queued, not delivered |
| Multiple writes | Consistency restored quickly | Consistency delayed |
| Hint expiration | Normal | Hints may expire before delivery |
Hint Expiration Risk
While delivery is paused, hints continue to age. If paused too long, hints may expire (default: 3 hours) and be lost. Run repair to restore consistency if hints expire.
Workflow: Controlled Hint Delivery
Section titled “Workflow: Controlled Hint Delivery”#!/bin/bashecho "=== Controlled Hint Delivery ==="
# 1. Check current hint statusecho "1. Current pending hints:"nodetool listpendinghints
# 2. Pause deliveryecho ""echo "2. Pausing hint delivery..."nodetool pausehandoff
# 3. Verify pausedecho ""echo "3. Hint thread activity (should show no active delivery):"nodetool tpstats | grep -i hint
# 4. Wait for user confirmationecho ""read -p "Press Enter to resume hint delivery..."
# 5. Resume deliveryecho ""echo "5. Resuming hint delivery..."nodetool resumehandoff
# 6. Monitor deliveryecho ""echo "6. Monitoring hint delivery:"watch -n 2 'nodetool tpstats | grep -i hint'Monitoring While Paused
Section titled “Monitoring While Paused”Track Hint Accumulation
Section titled “Track Hint Accumulation”# Check pending hints periodicallywatch -n 60 'nodetool listpendinghints'Monitor Hints Directory Size
Section titled “Monitor Hints Directory Size”# Track disk usage by hints (hints stored as files)watch -n 60 'du -sh /var/lib/cassandra/hints/'Check Hint Age
Section titled “Check Hint Age”#!/bin/bash# Monitor hint accumulation while paused
echo "=== Hint Status (Delivery Paused) ==="
# Pending hintsecho "Pending hints by target:"nodetool listpendinghints
# Hints directory sizeecho ""echo "Hints directory size:"du -sh /var/lib/cassandra/hints/
# Warn about expirationecho ""hint_window=$(grep "max_hint_window_in_ms" /etc/cassandra/cassandra.yaml 2>/dev/null | awk '{print $2}')if [ -n "$hint_window" ]; then hours=$((hint_window / 3600000)) echo "Hint window: ${hours} hours" echo "WARNING: Hints older than ${hours} hours will expire!"fiRisks and Mitigations
Section titled “Risks and Mitigations”Risk: Hint Expiration
Section titled “Risk: Hint Expiration”Cause: Hints expire while delivery is paused
Mitigation:
# Track pause durationecho "Paused at: $(date)" >> /var/log/cassandra/hint_pause.log
# Set a reminder to resumeecho "nodetool resumehandoff" | at now + 2 hours
# After resuming, check if hints expired and run repair if needednodetool resumehandoffnodetool repair -prRisk: Disk Space Exhaustion
Section titled “Risk: Disk Space Exhaustion”Cause: Hints accumulate while paused
Mitigation:
# Monitor disk usagedf -h /var/lib/cassandra
# If critical, may need to truncate hintsnodetool truncatehints
# Then run repair to restore consistencynodetool repair -prRisk: Forgot to Resume
Section titled “Risk: Forgot to Resume”Symptom: Recovered nodes remain inconsistent
Mitigation:
# Include in monitoring#!/bin/bashactive=$(nodetool tpstats 2>/dev/null | grep "HintedHandoff" | awk '{print $2}')pending=$(nodetool listpendinghints 2>/dev/null | tail -n +2 | awk '{sum+=$2} END {print sum}')
if [ "$pending" -gt 0 ] && [ "$active" -eq 0 ]; then echo "WARNING: Hints pending but delivery may be paused!" echo "Pending hints: $pending"fiCluster-Wide Operations
Section titled “Cluster-Wide Operations”Pause on All Nodes
Section titled “Pause on All Nodes”#!/bin/bashecho "Pausing hint delivery cluster-wide..."
# Get list of node IPs from local nodetool statusnodes=$(nodetool status | grep "^UN" | awk '{print $2}')
for node in $nodes; do echo -n "$node: " ssh "$node" 'nodetool pausehandoff 2>/dev/null && echo "paused" || echo "FAILED"'done
echo ""echo "Verification (hint thread activity):"for node in $nodes; do echo "=== $node ===" ssh "$node" "nodetool tpstats 2>/dev/null | grep -i hint"done
echo ""echo "REMEMBER: Resume with 'nodetool resumehandoff' on all nodes"Resume on All Nodes
Section titled “Resume on All Nodes”#!/bin/bashecho "Resuming hint delivery cluster-wide..."
# Get list of node IPs from local nodetool statusnodes=$(nodetool status | grep "^UN" | awk '{print $2}')
for node in $nodes; do echo -n "$node: " ssh "$node" 'nodetool resumehandoff 2>/dev/null && echo "resumed" || echo "FAILED"'done
echo ""echo "Hint delivery resumed on all nodes."Troubleshooting
Section titled “Troubleshooting”Hints Still Being Delivered After Pause
Section titled “Hints Still Being Delivered After Pause”# Verify pause was successfulnodetool tpstats | grep -i hint
# If still active, retrynodetool pausehandoff
# Check for multiple coordinators# Each coordinator node needs to pause separatelyCannot Pause
Section titled “Cannot Pause”# Check JMX connectivitynodetool info
# Check logs for errorstail -100 /var/log/cassandra/system.log | grep -i hintHigh Hint Accumulation While Paused
Section titled “High Hint Accumulation While Paused”# Check pending hintsnodetool listpendinghints
# Check hints directory sizedu -sh /var/lib/cassandra/hints/
# If too many hints, consider:# 1. Resume delivery to reduce backlog# 2. Or truncate and repair if hints will expire anywayComparison: Pause vs Disable
Section titled “Comparison: Pause vs Disable”| Aspect | pausehandoff | disablehandoff |
|---|---|---|
| New hint storage | Continues | Stops |
| Hint delivery | Stops | Stops |
| Coordinator disk impact | Continues growing | Stops growing |
| Recovery without repair | Yes (resume) | No (repair required) |
| Use case | Temporary relief | Emergency only |
Choose pausehandoff When:
Section titled “Choose pausehandoff When:”- Recovering node is overwhelmed
- Need temporary performance relief
- Plan to resume delivery soon
- Want to preserve hints for later delivery
Choose disablehandoff When:
Section titled “Choose disablehandoff When:”- Disk space emergency on coordinator
- Node will be down longer than hint window
- Need to completely stop hint-related activity
Best Practices
Section titled “Best Practices”Pause Guidelines
- Prefer pause over disable - Pause preserves hints for later delivery
- Set time limits - Don't leave paused indefinitely (hints expire)
- Monitor accumulation - Watch hint count and disk usage while paused
- Document the reason - Log why and when you paused
- Plan for resume - Know when you'll resume delivery
- Consider hint window - Resume before hints start expiring
Pause Duration Limits
The default hint window is 3 hours. If delivery is paused longer than this, hints for down nodes will expire and be lost. Either:
- Resume delivery before hints expire
- Plan for repair after resuming
- Adjust
max_hint_window_in_msif longer pause needed
Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| resumehandoff | Resume hint delivery |
| enablehandoff | Enable hint storage |
| disablehandoff | Disable hint storage and delivery |
| statushandoff | Check handoff status |
| listpendinghints | List pending hints |
| truncatehints | Remove all hints |