blob: 653a54af8fc040836bf7e99b0e2afe877d5acaa5 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-61232409-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-61232409-1');
</script>
<meta charset="UTF-8">
<meta name="ignite-version" content="2.9.0" />
<title>ZooKeeper Discovery | Ignite Documentation</title>
<link rel="canonical" href="/docs/latest/clustering/zookeeper-discovery" />
<link rel="stylesheet" href="/assets/css/styles.css?1600372551">
<link rel="stylesheet" href="/assets/css/asciidoc-pygments.css">
<link rel="shortcut icon" href="/favicon.ico">
<meta name='viewport' content='width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0'>
<script type="text/javascript" src="/assets/js/anchor.min.js?1600372551"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
</head>
<body>
<header>
<div class="container">
<button type='button' class='menu' title='Docs menu'>
<img src="/assets/images/menu-icon.svg"/>
</button>
<div class='home'>
<a href="/" class='home' title='Apache Ignite home'>
<img src="/assets/images/apache_ignite_logo.svg" alt="Apache Ignite logo" width="103" >
</a>
</div>
<nav>
</nav>
<select id="version-selector">
<option value="2.9.0">2.9.0</option>
</select>
<a href="https://github.com/apache/ignite" title='GitHub' class='github' target="_blank">
<img src="/assets/images/github-gray.svg" alt="GitHub logo">
</a>
<form class='search'>
<button class="search-close" type='button'><img src='/assets/images/cancel.svg'></button>
<input type="search" placeholder="Search…" id="search-input">
</form>
<button type='button' class='search-toggle'><img src='/assets/images/search.svg'></button>
<button type='button' class='top-nav-toggle'></button>
</div>
</header>
<link rel="stylesheet" href="/assets/css/docs.css">
<section class='page-docs'>
<nav class='left-nav' data-swiftype-index='false'>
<li>
<a href="/docs/latest/preface" class='' >Preface</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Quick Start Guides<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/quick-start/java"
class=''
>Java</a>
</li>
<li>
<a href="/docs/latest/quick-start/dotnet"
class=''
>.NET/C#</a>
</li>
<li>
<a href="/docs/latest/quick-start/cpp"
class=''
>C++</a>
</li>
<li>
<a href="/docs/latest/quick-start/python"
class=''
>Python</a>
</li>
<li>
<a href="/docs/latest/quick-start/nodejs"
class=''
>Node.JS</a>
</li>
<li>
<a href="/docs/latest/quick-start/sql"
class=''
>SQL</a>
</li>
<li>
<a href="/docs/latest/quick-start/php"
class=''
>PHP</a>
</li>
<li>
<a href="/docs/latest/quick-start/restapi"
class=''
>REST API</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="/installation" class='group-toggle collapsed '>Installation<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/installation/installing-using-zip"
class=''
>Installing Using ZIP Archive</a>
</li>
<li>
<a href="/docs/latest/installation/installing-using-docker"
class=''
>Installing Using Docker</a>
</li>
<li>
<a href="/docs/latest/installation/deb-rpm"
class=''
>Installing DEB or RPM package</a>
</li>
<li>
<button
type='button'
class='collapsed '>Kubernetes<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//installation/kubernetes/amazon-eks-deployment" class=''>Amazon EKS</a></li>
<li><a href="/docs/latest//installation/kubernetes/azure-deployment" class=''>Azure Kubernetes Service</a></li>
<li><a href="/docs/latest//installation/kubernetes/gke-deployment" class=''>Google Kubernetes Engine</a></li>
</nav>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Setting Up<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/setup"
class=''
>Setting Up Ignite for Java</a>
</li>
<li>
<a href="/docs/latest/setup-dotnet"
class=''
>Setting Up Ignite for .NET/C#</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/understanding-configuration" class='' >Understanding Configuration</a>
</li>
<li>
<a href="/docs/latest/logging" class='' >Configuring Logging</a>
</li>
<li>
<a href="/docs/latest/starting-nodes" class='' >Starting and Stopping Nodes</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Clustering<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/clustering/clustering"
class=''
>Overview</a>
</li>
<li>
<a href="/docs/latest/clustering/tcp-ip-discovery"
class=''
>TCP/IP Discovery</a>
</li>
<li>
<a href="/docs/latest/clustering/zookeeper-discovery"
class=''
>ZooKeeper Discovery</a>
</li>
<li>
<a href="/docs/latest/clustering/discovery-in-the-cloud"
class=''
>Discovery in the Cloud</a>
</li>
<li>
<a href="/docs/latest/clustering/network-configuration"
class=''
>Network Configuration</a>
</li>
<li>
<a href="/docs/latest/clustering/connect-client-nodes"
class=''
>Connecting Client Nodes</a>
</li>
<li>
<a href="/docs/latest/clustering/running-client-nodes-behind-nat"
class=''
>Running Client Nodes Behind NAT</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Data Modeling<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/data-modeling/data-modeling"
class=''
>Introduction</a>
</li>
<li>
<a href="/docs/latest/data-modeling/data-partitioning"
class=''
>Data Partitioning</a>
</li>
<li>
<a href="/docs/latest/data-modeling/affinity-collocation"
class=''
>Affinity Colocation</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Configuring Memory<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/memory-architecture"
class=''
>Memory Architecture</a>
</li>
<li>
<a href="/docs/latest/memory-configuration/data-regions"
class=''
>Configuring Data Regions</a>
</li>
<li>
<a href="/docs/latest/memory-configuration/eviction-policies"
class=''
>Eviction Policies</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Configuring Caches<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/configuring-caches/configuration-overview"
class=''
>Cache Configuration</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/configuring-backups"
class=''
>Configuring Partition Backups</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/atomicity-modes"
class=''
>Atomicity Modes</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/expiry-policies"
class=''
>Expiry Policy</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/on-heap-caching"
class=''
>On-Heap Caching</a>
</li>
<li>
<a href="/docs/latest/configuring-caches/cache-groups"
class=''
>Cache Groups</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Persistence<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/persistence/native-persistence"
class=''
>Ignite Persistence</a>
</li>
<li>
<a href="/docs/latest/persistence/external-storage"
class=''
>External Storage</a>
</li>
<li>
<a href="/docs/latest/persistence/swap"
class=''
>Swapping</a>
</li>
<li>
<a href="/docs/latest/persistence/custom-cache-store"
class=''
>Implementing Custom Cache Store</a>
</li>
<li>
<a href="/docs/latest/persistence/snapshots"
class=''
>Cluster Snapshots</a>
</li>
<li>
<a href="/docs/latest/persistence/disk-compression"
class=''
>Disk Compression</a>
</li>
<li>
<a href="/docs/latest/persistence/persistence-tuning"
class=''
>Tuning Persistence</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/baseline-topology" class='' >Baseline Topology</a>
</li>
<li>
<a href="/docs/latest/cluster-states" class='' >Cluster States</a>
</li>
<li>
<a href="/docs/latest/data-rebalancing" class='' >Data Rebalancing</a>
</li>
<li>
<a href="/docs/latest/partition-loss-policy" class='' >Partition Loss Policy</a>
</li>
<li>
<a href="/docs/latest/deploying-user-code" class='' >Deploying User Code</a>
</li>
<li>
<a href="/docs/latest/peer-class-loading" class='' >Peer Class Loading</a>
</li>
<li>
<a href="/docs/latest/data-streaming" class='' >Data Streaming</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Using Key-Value Cache API<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/key-value-api/basic-cache-operations"
class=''
>Basic Cache Operations</a>
</li>
<li>
<a href="/docs/latest/key-value-api/binary-objects"
class=''
>Working with Binary Objects</a>
</li>
<li>
<a href="/docs/latest/key-value-api/using-scan-queries"
class=''
>Using Scan Queries</a>
</li>
<li>
<a href="/docs/latest/read-repair"
class=''
>Read Repair</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/key-value-api/continuous-queries" class='' >Using Continuous Queries</a>
</li>
<li>
<a href="/docs/latest/key-value-api/transactions" class='' >Performing Transactions</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Working with SQL<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/SQL/sql-introduction"
class=''
>Introduction</a>
</li>
<li>
<a href="/docs/latest/SQL/schemas"
class=''
>Understanding Schemas</a>
</li>
<li>
<a href="/docs/latest/SQL/indexes"
class=''
>Defining Indexes</a>
</li>
<li>
<a href="/docs/latest/SQL/sql-api"
class=''
>Using SQL API</a>
</li>
<li>
<a href="/docs/latest/SQL/distributed-joins"
class=''
>Distributed Joins</a>
</li>
<li>
<a href="/docs/latest/SQL/sql-transactions"
class=''
>SQL Transactions</a>
</li>
<li>
<a href="/docs/latest/SQL/custom-sql-func"
class=''
>Custom SQL Functions</a>
</li>
<li>
<a href="/docs/latest/SQL/JDBC/jdbc-driver"
class=''
>JDBC Driver</a>
</li>
<li>
<a href="/docs/latest/SQL/JDBC/jdbc-client-driver"
class=''
>JDBC Client Driver</a>
</li>
<li>
<a href="/docs/latest/transactions/mvcc"
class=''
>Multiversion Concurrency Control</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Distributed Computing<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/distributed-computing/distributed-computing"
class=''
>Distributed Computing API</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/cluster-groups"
class=''
>Cluster Groups</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/executor-service"
class=''
>Executor Service</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/map-reduce"
class=''
>MapReduce API</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/load-balancing"
class=''
>Load Balancing</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/fault-tolerance"
class=''
>Fault Tolerance</a>
</li>
<li>
<a href="/docs/latest/distributed-computing/job-scheduling"
class=''
>Job Scheduling</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/collocated-computations" class='' >Colocating Computations with Data</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Working with Events<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/events/listening-to-events"
class=''
>Enabling and Listenting to Events</a>
</li>
<li>
<a href="/docs/latest/events/events"
class=''
>Events</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/near-cache" class='' >Near Caches</a>
</li>
<li>
<a href="/docs/latest/platform-cache" class='' >.NET Platform Cache</a>
</li>
<li>
<a href="/docs/latest/services/services" class='' >Services</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Distributed Data Structures<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/data-structures/queue-and-set"
class=''
>Queue and Set</a>
</li>
<li>
<a href="/docs/latest/data-structures/atomic-types"
class=''
>Atomic Types</a>
</li>
<li>
<a href="/docs/latest/data-structures/countdownlatch"
class=''
>CountDownLatch</a>
</li>
<li>
<a href="/docs/latest/data-structures/atomic-sequence"
class=''
>Atomic Sequence</a>
</li>
<li>
<a href="/docs/latest/data-structures/semaphore"
class=''
>Semaphore</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Machine Learning<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/machine-learning/machine-learning"
class=''
>Machine Learning</a>
</li>
<li>
<a href="/docs/latest/machine-learning/partition-based-dataset"
class=''
>Partition Based Dataset</a>
</li>
<li>
<a href="/docs/latest/machine-learning/updating-trained-models"
class=''
>Updating Trained Models</a>
</li>
<li>
<button
type='button'
class='collapsed '>Binary Classification<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/binary-classification/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/linear-svm" class=''>Linear SVM (Support Vector Machine)</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/decision-trees" class=''>Decision Trees</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/multilayer-perceptron" class=''>Multilayer Perceptron</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/logistic-regression" class=''>Logistic Regression</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/knn-classification" class=''>k-NN Classification</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/ann" class=''>ANN (Approximate Nearest Neighbor)</a></li>
<li><a href="/docs/latest//machine-learning/binary-classification/naive-bayes" class=''>Naive Bayes</a></li>
</nav>
</li>
<li>
<button
type='button'
class='collapsed '>Regression<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/regression/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/regression/linear-regression" class=''>Linear Regression</a></li>
<li><a href="/docs/latest//machine-learning/regression/decision-trees-regression" class=''>Decision Trees Regression</a></li>
<li><a href="/docs/latest//machine-learning/regression/knn-regression" class=''>k-NN Regression</a></li>
</nav>
</li>
<li>
<button
type='button'
class='collapsed '>Clustering<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/clustering/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/clustering/k-means-clustering" class=''>K-Means Clustering</a></li>
<li><a href="/docs/latest//machine-learning/clustering/gaussian-mixture" class=''>Gaussian mixture (GMM)</a></li>
</nav>
</li>
<li>
<a href="/docs/latest/machine-learning/preprocessing"
class=''
>Preprocessing</a>
</li>
<li>
<button
type='button'
class='collapsed '>Model Selection<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/model-selection/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/model-selection/evaluator" class=''>Evaluator</a></li>
<li><a href="/docs/latest//machine-learning/model-selection/split-the-dataset-on-test-and-train-datasets" class=''>Split the dataset on test and train datasets</a></li>
<li><a href="/docs/latest//machine-learning/model-selection/hyper-parameter-tuning" class=''>Hyper-parameter tuning</a></li>
<li><a href="/docs/latest//machine-learning/model-selection/pipeline-api" class=''>Pipeline API</a></li>
</nav>
</li>
<li>
<a href="/docs/latest/machine-learning/multiclass-classification"
class=''
>Multiclass Classification</a>
</li>
<li>
<button
type='button'
class='collapsed '>Ensemble Methods<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/ensemble-methods/introduction" class=''></a></li>
<li><a href="/docs/latest//machine-learning/ensemble-methods/stacking" class=''>Stacking</a></li>
<li><a href="/docs/latest//machine-learning/ensemble-methods/baggin" class=''>Bagging</a></li>
<li><a href="/docs/latest//machine-learning/ensemble-methods/random-forest" class=''>Random Forest</a></li>
<li><a href="/docs/latest//machine-learning/ensemble-methods/gradient-boosting" class=''>Gradient Boosting</a></li>
</nav>
</li>
<li>
<a href="/docs/latest/machine-learning/recommendation-systems"
class=''
>Recommendation Systems</a>
</li>
<li>
<button
type='button'
class='collapsed '>Importing Model<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//machine-learning/importing-model/introduction" class=''>Introduction</a></li>
<li><a href="/docs/latest//machine-learning/importing-model/model-import-from-gxboost" class=''>Import Model from XGBoost</a></li>
<li><a href="/docs/latest//machine-learning/importing-model/model-import-from-apache-spark" class=''>Import Model from Apache Spark</a></li>
</nav>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Monitoring<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/monitoring-metrics/intro"
class=''
>Introduction</a>
</li>
<li>
<a href="/docs/latest/monitoring-metrics/cluster-id"
class=''
>Cluster ID and Tag</a>
</li>
<li>
<button
type='button'
class='collapsed '>Metrics<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//monitoring-metrics/configuring-metrics" class=''>Configuring Metrics</a></li>
<li><a href="/docs/latest//monitoring-metrics/metrics" class=''>JMX Metrics</a></li>
</nav>
</li>
<li>
<button
type='button'
class='collapsed '>New Metrics System<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//monitoring-metrics/new-metrics-system" class=''>Introduction</a></li>
<li><a href="/docs/latest//monitoring-metrics/new-metrics" class=''>Metrics</a></li>
</nav>
</li>
<li>
<a href="/docs/latest/monitoring-metrics/system-views"
class=''
>System Views</a>
</li>
<li>
<a href="/docs/latest/monitoring-metrics/tracing"
class=''
>Tracing</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="/security" class='group-toggle collapsed '>Security<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/security/authentication"
class=''
>Authentication</a>
</li>
<li>
<a href="/docs/latest/security/ssl-tls"
class=''
>SSL/TLS</a>
</li>
<li>
<button
type='button'
class='collapsed '>Transparent Data Encryption<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//security/tde" class=''>Introduction</a></li>
<li><a href="/docs/latest//security/master-key-rotation" class=''>Master key rotation</a></li>
</nav>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Thin Clients<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/thin-clients/getting-started-with-thin-clients"
class=''
>Thin Clients Overview</a>
</li>
<li>
<a href="/docs/latest/thin-clients/java-thin-client"
class=''
>Java Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/dotnet-thin-client"
class=''
>.NET Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/cpp-thin-client"
class=''
>C++ Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/python-thin-client"
class=''
>Python Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/php-thin-client"
class=''
>PHP Thin Client</a>
</li>
<li>
<a href="/docs/latest/thin-clients/nodejs-thin-client"
class=''
>Node.js Thin Client</a>
</li>
<li>
<button
type='button'
class='collapsed '>Binary Client Protocol<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class="sub_pages collapsed">
<li><a href="/docs/latest//binary-client-protocol/binary-client-protocol" class=''>Binary Client Protocol</a></li>
<li><a href="/docs/latest//binary-client-protocol/data-format" class=''>Data Format</a></li>
<li><a href="/docs/latest//binary-client-protocol/key-value-queries" class=''>Key-Value Queries</a></li>
<li><a href="/docs/latest//binary-client-protocol/sql-and-scan-queries" class=''>SQL and Scan Queries</a></li>
<li><a href="/docs/latest//binary-client-protocol/binary-type-metadata" class=''>Binary Types Metadata</a></li>
<li><a href="/docs/latest//binary-client-protocol/cache-configuration" class=''>Cache Configuration</a></li>
</nav>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>ODBC Driver<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/SQL/ODBC/odbc-driver"
class=''
>ODBC Driver</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/connection-string-dsn"
class=''
>Connection String and DSN</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/querying-modifying-data"
class=''
>Querying and Modifying Data</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/specification"
class=''
>Specification</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/data-types"
class=''
>Data Types</a>
</li>
<li>
<a href="/docs/latest/SQL/ODBC/error-codes"
class=''
>Error Codes</a>
</li>
</nav>
</li>
<li>
<a href="/docs/latest/restapi" class='' >REST API</a>
</li>
<li>
<a href="/docs/latest/control-script" class='' >Control Script</a>
</li>
<li>
<a href="/docs/latest/plugins" class='' >Plugins</a>
</li>
<li>
<a href="/docs/latest/sqlline" class='' >SQLLine</a>
</li>
<li>
<button type='button' data-guide-url="" class='group-toggle collapsed '>Ignite for Spark<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/ignite-for-spark/overview"
class=''
>Overview</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/ignitecontext-and-rdd"
class=''
>IgniteContext and IgniteRDD</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/ignite-dataframe"
class=''
>Ignite DataFrame</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/installation"
class=''
>Installation</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/spark-shell"
class=''
>Test Ignite with Spark-shell</a>
</li>
<li>
<a href="/docs/latest/ignite-for-spark/troubleshooting"
class=''
>Troubleshooting</a>
</li>
</nav>
</li>
<li>
<button type='button' data-guide-url="/sql-reference/sql-reference-overview" class='group-toggle collapsed '>SQL Reference<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button>
<nav class='nav-group collapsed'>
<li>
<a href="/docs/latest/sql-reference/sql-conformance"
class=''
>SQL Conformance</a>
</li>
<li>
<a href="/docs/latest/sql-reference/ddl"
class=''
>Data Definition Language (DDL)</a>
</li>
<li>
<a href="/docs/latest/sql-reference/dml"
class=''
>Data Manipulation Language (DML)</a>
</li>
<li>
<a href="/docs/latest/sql-reference/transactions"
class=''
>Transactions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/operational-commands"
class=''
>Operational Commands</a>
</li>
<li>
<a href="/docs/latest/sql-reference/aggregate-functions"
class=''
>Aggregate functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/numeric-functions"
class=''
>Numeric Functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/string-functions"
class=''
>String Functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/date-time-functions"
class=''
>Data and Time Functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/system-functions"
class=''
>System Functions</a>
</li>
<li>
<a href="/docs/latest/sql-reference/data-types"
class=''
>Data Types</a>
</li>
</nav>
</li>
</nav>
<div class="left-nav__overlay"></div>
<article data-swiftype-index='true'>
<a class='edit-link' href="https://github.com/apache/ignite/tree/IGNITE-7595/docs/_docs/clustering/zookeeper-discovery.adoc" target="_blank">Edit</a>
<h1>ZooKeeper Discovery</h1>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>Ignite&#8217;s default TCP/IP Discovery organizes cluster nodes into a ring topology that has advantages and
disadvantages. For instance, on topologies with hundreds of cluster
nodes, it can take many seconds for a system message to traverse through
all the nodes. As a result, the basic processing of events such as
joining of new nodes or detecting the failed ones can take a while,
affecting the overall cluster responsiveness and performance.</p>
</div>
<div class="paragraph">
<p>ZooKeeper Discovery is designed for massive deployments that
need to preserve ease of scalability and linear performance.
However, using both Ignite and ZooKeeper requires configuring and managing two
distributed systems, which can be challenging.
Therefore, we recommend that you use ZooKeeper Discovery only if you plan to scale to 100s or 1000s nodes.
Otherwise, it is best to use <a href="/docs/latest/clustering/tcp-ip-discovery">TCP/IP Discovery</a>.</p>
</div>
<div class="paragraph">
<p>ZooKeeper Discovery uses ZooKeeper as a single point of synchronization
and to organize the cluster into a star-shaped topology where a
ZooKeeper cluster sits in the center and the Ignite nodes exchange
discovery events through it.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="/docs/2.9.0/images/zookeeper.png" alt="Zookeeper">
</div>
</div>
<div class="paragraph">
<p>It is worth mentioning that ZooKeeper Discovery is an alternative implementation of the Discovery SPI and doesn’t affect the Communication SPI.
Once the nodes discover each other via ZooKeeper Discovery, they use Communication SPI for peer-to-peer communication.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="configuration">Configuration</h2>
<div class="sectionbody">
<div class="paragraph">
<p>To enable ZooKeeper Discovery, you need to configure <code>ZookeeperDiscoverySpi</code> in a way similar to this:</p>
</div>
<code-tabs><code-tab data-tab='XML'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="xml"><span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.configuration.IgniteConfiguration"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"discoverySpi"</span><span class="nt">&gt;</span>
<span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"zkConnectionString"</span> <span class="na">value=</span><span class="s">"127.0.0.1:34076,127.0.0.1:43310,127.0.0.1:36745"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"sessionTimeout"</span> <span class="na">value=</span><span class="s">"30000"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"zkRootPath"</span> <span class="na">value=</span><span class="s">"/apacheIgnite"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"joinTimeout"</span> <span class="na">value=</span><span class="s">"10000"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/bean&gt;</span>
<span class="nt">&lt;/property&gt;</span>
<span class="nt">&lt;/bean&gt;</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='Java'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="java"><span class="nc">ZookeeperDiscoverySpi</span> <span class="n">zkDiscoverySpi</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">ZookeeperDiscoverySpi</span><span class="o">();</span>
<span class="n">zkDiscoverySpi</span><span class="o">.</span><span class="na">setZkConnectionString</span><span class="o">(</span><span class="s">"127.0.0.1:34076,127.0.0.1:43310,127.0.0.1:36745"</span><span class="o">);</span>
<span class="n">zkDiscoverySpi</span><span class="o">.</span><span class="na">setSessionTimeout</span><span class="o">(</span><span class="mi">30_000</span><span class="o">);</span>
<span class="n">zkDiscoverySpi</span><span class="o">.</span><span class="na">setZkRootPath</span><span class="o">(</span><span class="s">"/ignite"</span><span class="o">);</span>
<span class="n">zkDiscoverySpi</span><span class="o">.</span><span class="na">setJoinTimeout</span><span class="o">(</span><span class="mi">10_000</span><span class="o">);</span>
<span class="nc">IgniteConfiguration</span> <span class="n">cfg</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">IgniteConfiguration</span><span class="o">();</span>
<span class="c1">//Override default discovery SPI.</span>
<span class="n">cfg</span><span class="o">.</span><span class="na">setDiscoverySpi</span><span class="o">(</span><span class="n">zkDiscoverySpi</span><span class="o">);</span>
<span class="c1">// Start the node.</span>
<span class="nc">Ignite</span> <span class="n">ignite</span> <span class="o">=</span> <span class="nc">Ignition</span><span class="o">.</span><span class="na">start</span><span class="o">(</span><span class="n">cfg</span><span class="o">);</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='.NET' data-unavailable='true'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code>This API is not presently available for .NET. You can use XML configuration.</code></pre>
</div>
</div></code-tab><code-tab data-tab='C++' data-unavailable='true'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code>This API is not presently available for C++. You can use XML configuration.</code></pre>
</div>
</div></code-tab></code-tabs>
<div class="paragraph">
<p>The following parameters are required (other parameters are optional):</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>zkConnectionString</code> - keeps the list of addresses of ZooKeeper
servers.</p>
</li>
<li>
<p><code>sessionTimeout</code> - specifies the time after which an Ignite node is considered disconnected if it doesn’t react to events exchanged via Discovery SPI.​</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="failures-and-split-brain-handling">Failures and Split Brain Handling</h2>
<div class="sectionbody">
<div class="paragraph">
<p>In case of network partitioning, some of ​the nodes cannot communicate to each other because they are located in separated network segments, which may lead to failure to process user requests or inconsistent data modification.</p>
</div>
<div class="paragraph">
<p>ZooKeeper Discovery approaches network partitioning (aka. split brain)
and communication failures between individual nodes in the following
way:</p>
</div>
<div class="admonitionblock caution">
<table>
<tr>
<td class="icon">
<div class="title">Caution</div>
</td>
<td class="content">
<div class="paragraph">
<p>It is assumed that the ZooKeeper cluster is always visible to all the
nodes in the cluster. In fact, if a node disconnects from ZooKeeper, it
shuts down and other nodes treat it as failed or disconnected.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Whenever a node discovers that it cannot connect to some of the other
nodes in the cluster, it initiates a communication failure resolution
process by publishing special requests to the ZooKeeper cluster. When
the process is started, all nodes try to connect to each other and send
the results of the connection attempts to the node that coordinates the
process (<em>the coordinator node</em>). Based on this information, the
coordinator node creates a connectivity graph that represents the
network situation in the cluster. Further actions depend on the type of
network segmentation. The following sections discuss possible scenarios.</p>
</div>
<div class="sect2">
<h3 id="cluster-is-split-into-several-disjoint-components">Cluster is split into several disjoint components</h3>
<div class="paragraph">
<p>If the cluster is split into several independent components, each
component (being a cluster) may think of itself as a master cluster and
continue to process user requests, resulting in data inconsistency. To
avoid this, only the component with the largest number of nodes is kept
alive; and the nodes from the other components are brought down.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="/docs/2.9.0/images/network_segmentation.png" alt="Network Segmentation">
</div>
</div>
<div class="paragraph">
<p>The image above shows a case where the cluster network is split into 2 segments.
The nodes from the smaller cluster (right-hand segment) are terminated.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="/docs/2.9.0/images/segmentation_resolved.png" alt="Segmentation Resolved">
</div>
</div>
<div class="paragraph">
<p>When there are multiple largest components, the one that has the largest
number of clients is kept alive, and the others are shut down.</p>
</div>
</div>
<div class="sect2">
<h3 id="several-links-between-nodes-are-missing">Several links between nodes are missing</h3>
<div class="paragraph">
<p>Some nodes cannot connect to some other nodes, which means the nodes are
not completely disconnected from the cluster but can’t exchange data
with some of the nodes and, therefore, cannot be part of the cluster. In
the image below, one node cannot connect to two other nodes.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="/docs/2.9.0/images/split_brain.png" alt="Split-brain">
</div>
</div>
<div class="paragraph">
<p>In this case, the task is to find the largest component in which every
node can connect to every other node, which, in the general case, is a
difficult problem and cannot be solved in an acceptable amount of time. The
coordinator node uses a heuristic algorithm to find the best approximate
solution. The nodes that are left out of the solution are shut down.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="/docs/2.9.0/images/split_brain_resolved.png" alt="Split-brain Resolved">
</div>
</div>
</div>
<div class="sect2">
<h3 id="zookeeper-cluster-segmentation">ZooKeeper cluster segmentation</h3>
<div class="paragraph">
<p>In large-scale deployments where the ZooKeeper cluster can span multiple data centers and geographically diverse locations, it can split into multiple segments due to network segmentation.
If this occurs, ZooKeeper checks if there is a segment that contains more than a half of all ZooKeeper nodes (ZooKeeper requires this many nodes to continue its operation), and, if found, this segment takes over managing the Ignite cluster, while other segments are shut down.
If there is no such segment, ZooKeeper shuts down all its nodes.</p>
</div>
<div class="paragraph">
<p>In case of ZooKeeper cluster segmentation, the Ignite cluster may or may not be split.
In any case, when the ZooKeeper nodes are shut down, the corresponding Ignite nodes try to connect to available ZooKeeper nodes and shut down if unable to do so.</p>
</div>
<div class="paragraph">
<p>The following image is an example of network segmentation that splits both the Ignite cluster and ZooKeeper cluster into two segments.
This may happen if your clusters are deployed in two data centers.
In this case, the ZooKeeper node located in Data Center B shuts itself down.
The Ignite nodes located in Data Center B are not able to connect to the remaining ZooKeeper nodes and shut themselves down as well.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="/docs/2.9.0/images/zookeeper_split.png" alt="Zookeeper Split">
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="custom-discovery-events">Custom Discovery Events</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Changing a ring-shaped topology to the star-shaped one affects the way
custom discovery events are handled by the Discovery SPI component. Since
the ring topology is linear, it means that each discovery message is
processed by nodes sequentially.</p>
</div>
<div class="paragraph">
<p>With ZooKeeper Discovery, the coordinator sends discovery messages to
all nodes simultaneously resulting in the messages to be processed in
parallel. As a result, ZooKeeper Discovery prohibits custom discovery events from being changed. For instance, the nodes are not allowed to add any payload to discovery messages.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="ignite-and-zookeeper-configuration-considerations">Ignite and ZooKeeper Configuration Considerations</h2>
<div class="sectionbody">
<div class="paragraph">
<p>When using ZooKeeper Discovery, you need to make sure that the configuration parameters of the ZooKeeper cluster and Ignite cluster match each other.</p>
</div>
<div class="paragraph">
<p>Consider a sample ZooKeeper configuration, as follows:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># The number of milliseconds of each tick</span>
<span class="nv">tickTime</span><span class="o">=</span>2000
<span class="c"># The number of ticks that can pass between sending a request and getting an acknowledgement</span>
<span class="nv">syncLimit</span><span class="o">=</span>5</code></pre>
</div>
</div>
<div class="paragraph">
<p>Configured this way, ZooKeeper server detects its own segmentation from the rest of the ZooKeeper cluster only after <code>tickTime * syncLimit</code> elapses.
Until this event is detected at ZooKeeper level, all Ignite nodes connected to the segmented ZooKeeper server do not try to reconnect to the other ZooKeeper servers.</p>
</div>
<div class="paragraph">
<p>On the other hand, there is a <code>sessionTimeout</code> parameter on the Ignite
side that defines how soon ZooKeeper closes an Ignite node’s session if
the node gets disconnected from the ZooKeeper cluster.
If <code>sessionTimeout</code> is smaller than <code>tickTime * syncLimit</code> , then the
Ignite node is notified by the segmented ZooKeeper server too
late — its session expires before it tries to reconnect to other ZooKeeper servers.</p>
</div>
<div class="paragraph">
<p>To avoid this situation, <code>sessionTimeout</code> should be bigger than <code>tickTime * syncLimit</code>.</p>
</div>
</div>
</div>
<div class="copyright">
© 2020 The Apache Software Foundation.<br/>
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.
</div>
</article>
<nav class="right-nav" data-swiftype-index='false'>
<ul class="sectlevel1">
<li><a href="#configuration">Configuration</a></li>
<li><a href="#failures-and-split-brain-handling">Failures and Split Brain Handling</a>
<ul class="sectlevel2">
<li><a href="#cluster-is-split-into-several-disjoint-components">Cluster is split into several disjoint components</a></li>
<li><a href="#several-links-between-nodes-are-missing">Several links between nodes are missing</a></li>
<li><a href="#zookeeper-cluster-segmentation">ZooKeeper cluster segmentation</a></li>
</ul>
</li>
<li><a href="#custom-discovery-events">Custom Discovery Events</a></li>
<li><a href="#ignite-and-zookeeper-configuration-considerations">Ignite and ZooKeeper Configuration Considerations</a></li>
</ul>
<footer>
</footer>
</nav>
</section>
<script type='module' src='/assets/js/code-copy-to-clipboard.js' async crossorigin></script>
<script>
// inits deep anchors -- needs to be done here because of https://www.bryanbraun.com/anchorjs/#dont-run-it-too-late
anchors.add('.page-docs h1, .page-docs h2, .page-docs h3:not(.discrete), .page-docs h4, .page-docs h5');
anchors.options = {
placement: 'right',
visible: 'always'
};
</script>
<!-- load google fonts async -->
<script type="text/javascript">
WebFontConfig = {
google: { families: [ 'Open+Sans:300,400,600,700&display=swap' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})(); </script>
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script>
docsearch({
// Your apiKey and indexName will be given to you once
// we create your config
apiKey: '3eee686c0ebe39eff3baeb18c56fa5f8',
indexName: 'apache_ignite',
// Replace inputSelector with a CSS selector
// matching your search input
inputSelector: '#search-input',
// algoliaOptions: { 'facetFilters': ["version:$VERSION"] },
// Set debug to true to inspect the dropdown
debug: false,
});
</script>
<script type='module' src='/assets/js/index.js?1600372551' async crossorigin></script>
<script type='module' src='/assets/js/versioning.js?1600372551' async crossorigin></script>
</body>
</html>