Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Cassandra Seeds and Cluster Discovery

Seed nodes are designated contact points that facilitate cluster discovery and gossip protocol initialization. While operationally identical to other nodes, seeds play a critical role in cluster formation, node bootstrapping, and partition recovery scenarios.


FunctionDescriptionWhen Used
Bootstrap discoveryProvide initial cluster topology to joining nodesNew node startup
Gossip initializationFirst peers for gossip protocol establishmentNode startup
Gossip fallbackContacted opportunistically during gossip roundsSteady-state gossip
Cluster formationEnable initial cluster creationFirst nodes starting

Seeds are often misunderstood. They do not:

  • Have special data responsibilities
  • Act as coordinators or masters
  • Store additional metadata
  • Require more resources than other nodes
  • Need to be online for cluster operation (after initial formation)

Operational Equivalence

After cluster formation, seeds function identically to non-seed nodes. The "seed" designation only affects gossip peer selection and bootstrap discovery—not data storage, query coordination, or any other operational aspect.


When a new node starts, it must discover the existing cluster:

Bootstrap Discovery ProcessBootstrap Discovery Process1. New Node StartsReads cassandra.yaml2. Contact Seed NodesFrom configured seed list3. Receive Gossip StateLearn all cluster members4. Determine Token OwnershipCalculate ranges to own5. Announce to ClusterGossip own endpoint state6. Stream DataReceive owned ranges7. Ready for TrafficSTATUS = NORMAL

Discovery sequence details:

  1. Read configuration: Parse seed_provider from cassandra.yaml
  2. Attempt seed contact: Contact seeds (order may vary) until one responds
  3. Receive cluster state: Seed sends complete gossip state (all known endpoints)
  4. Integrate into gossip: Begin participating in gossip protocol
  5. Determine ownership: Calculate token ranges (automatic with vnodes)
  6. Announce presence: Gossip own state to cluster
  7. Bootstrap streaming: Receive data for owned token ranges

During normal gossip operation, seeds receive preferential treatment:

Gossip round (per second per node):
1. Select random live peer → send GossipDigestSyn
2. Maybe contact unreachable node:
- Probability = unreachable_count / (live_count + 1)
3. If step 1 didn't contact a seed:
- Maybe contact a random seed
- Probability based on cluster state

This preferential treatment ensures:

  • Seeds maintain current cluster state
  • Partitioned segments can reconnect via seeds
  • New nodes can always discover the cluster

cassandra.yaml
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "10.0.1.1,10.0.1.2,10.0.1.3"
ParameterDescriptionExample
class_nameSeed provider implementationSimpleSeedProvider
seedsComma-separated list of seed IP addresses"10.0.1.1,10.0.1.2"

For multi-datacenter deployments, include seeds from each datacenter:

# cassandra.yaml - Multi-DC seed configuration
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
# Include 2-3 seeds per datacenter
- seeds: "10.0.1.1,10.0.1.2,10.1.1.1,10.1.1.2"
# └── DC1 seeds ──┘ └── DC2 seeds ──┘

GuidelineRationale
2-3 seeds per datacenterRedundancy without excessive gossip traffic
Distribute across racksSurvive rack-level failures
Use stable, reliable nodesSeeds should rarely be replaced
Same list on all nodesConsistent cluster discovery
Ensure reachabilityAt least one seed should be reachable from starting nodes
Cluster SizeSeeds per DCTotal SeedsNotes
3-5 nodes22Minimum viable
6-20 nodes2-32-3Standard deployment
20-100 nodes33-6Large cluster
100+ nodes36-9Very large cluster

When choosing which nodes to designate as seeds:

Seed Selection CriteriaSeed Selection CriteriaSelection CriteriaStable Nodes• Rarely rebooted• Reliable hardware• Low failure rateDistributed• Different racks• Different failure domains• Network diversityReachable• Central network location• Low latency to others• Not behind firewalls

Problem: Only one seed configured

# BAD: Single point of failure
seeds: "10.0.1.1"

Impact:

  • If seed is down, new nodes cannot join
  • Cluster formation requires seed availability

Solution:

# GOOD: Multiple seeds
seeds: "10.0.1.1,10.0.1.2,10.0.1.3"

Problem: All or most nodes designated as seeds

# BAD: Excessive seeds
seeds: "10.0.1.1,10.0.1.2,10.0.1.3,10.0.1.4,10.0.1.5,10.0.1.6,..."

Impact:

  • Increased gossip traffic to seeds
  • No operational benefit
  • Harder to maintain consistency

Solution: Limit to 2-3 per datacenter.

Problem: Different nodes have different seed configurations

# Node A: seeds: "10.0.1.1,10.0.1.2"
# Node B: seeds: "10.0.1.3,10.0.1.4"

Impact:

  • Cluster may fragment
  • Inconsistent discovery behavior
  • Potential for split-brain scenarios

Solution: Identical seed list on all nodes.

Problem: All seeds on same rack or availability zone

# BAD: All seeds in rack1
seeds: "10.0.1.1,10.0.1.2,10.0.1.3" # All rack1

Impact:

  • Rack failure makes cluster unreachable for new nodes
  • Reduced partition recovery capability

Solution: Distribute seeds across failure domains.

Problem: Seeds behind firewalls or unreachable from other nodes

Impact:

  • Bootstrap failures
  • Gossip initialization failures

Solution:

  • Ensure port 7000 (or storage_port) open between all nodes
  • Verify network connectivity before adding seeds

To designate an existing node as a seed:

  1. Update configuration on all nodes:

    seeds: "10.0.1.1,10.0.1.2,10.0.1.3,10.0.1.4" # Added 10.0.1.4
  2. Rolling restart (optional but recommended):

    • Restart nodes one at a time
    • New seed designation takes effect

No Restart Required

Adding a seed to the configuration doesn't require immediate restart. The change takes effect when nodes restart for other reasons. However, a rolling restart ensures consistent behavior sooner.

To remove a node from seed designation:

  1. Ensure other seeds are available:

    • Verify remaining seeds are operational
    • Minimum 2 seeds should remain per datacenter
  2. Update configuration on all nodes:

    seeds: "10.0.1.1,10.0.1.2" # Removed 10.0.1.3
  3. Rolling restart (optional but recommended)

If a seed node fails permanently:

  1. Remove from seed list (all nodes' configuration)
  2. Add replacement seed (different node)
  3. Handle the failed node:
    • If recoverable: repair and restart
    • If not recoverable: use removenode or assassinate

During network partitions, seeds help reconnect isolated cluster segments:

Seed-Assisted Partition RecoverySeed-Assisted Partition RecoveryDuring PartitionAfter Partition HealsSegment ANodes 1,2,3(Seed: Node 1)Segment BNodes 4,5,6(Seed: Node 4)Network HealsSeeds contact each otherGossip State MergedCluster reunifiedNetworkPartition

Recovery mechanism:

  1. Network partition isolates cluster segments
  2. Each segment continues operating independently
  3. Gossip within segments maintains local consistency
  4. Seeds in each segment attempt cross-segment communication
  5. When partition heals, seeds gossip across segments
  6. State merges using version numbers (higher wins)
  7. Cluster reunifies with consistent state
RequirementReason
Seeds in each segmentAt least one seed per potential partition
Gossip to seeds continuesSeeds receive state updates from local segment
Version orderingGeneration/version numbers resolve conflicts

Terminal window
# Verify seed connectivity
nodetool gossipinfo | grep -A1 "generation"
# Check if seeds are live
nodetool status | grep -E "UN|DN"
# Verify gossip state includes seeds
nodetool gossipinfo | grep "<seed_ip>"
MetricSourceConcern Threshold
Gossip messages to seedsJMXAbnormally high or zero
Seed node statusnodetool statusDN (Down) state
Bootstrap success rateLogsFailures mentioning seeds

# SimpleSeedProvider - reads from configuration
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "10.0.1.1,10.0.1.2"

For dynamic cloud environments, custom seed providers can integrate with cloud APIs:

Cloud ProviderApproach
AWSEC2 tags, Auto Scaling groups, ECS service discovery
GCPInstance groups, GCE metadata
KubernetesHeadless services, StatefulSet endpoints
AzureVMSS, Azure DNS

Custom seed providers implement org.apache.cassandra.locator.SeedProvider interface.