When Apache NiFi high availability is worth designing for
Design for high availability when a flow cannot stop during a node failure, or when data in flight cannot be lost if a server goes down. A single NiFi node is often enough for flows that tolerate a restart and can be replayed from their sources. It is not enough when downstream systems depend on continuous ingestion, when a stalled flow backs up upstream producers, or when a failed host would leave data stranded in its local repositories until someone intervenes. Start by listing each flow, its tolerance for interruption, and whether its sources can be re-read. Those answers decide whether clustering is a requirement or an expense you do not need yet.
Apache NiFi clustering gives you coordinated flow management across nodes. The nodes share one flow definition, elect a cluster coordinator and a primary node, and distribute work across the cluster. That coordination does not make a cluster a backup or a disaster recovery plan. A cluster replicates the running flow state, but it does not protect you from accidental deletion of a flow, a bad configuration change that every node adopts, corruption in a shared dependency, or the loss of an entire site. Plan separate backups of the flow definition, parameter contexts, configuration files and security material, and a recovery path for a site outage. Confirm the exact replication and recovery behavior for your NiFi version in the NiFi System Administrator's Guide.
Clustering is harder than it looks because four things must be right at once: coordination state, node storage, load balancing and node sizing. Coordination depends on ZooKeeper, either embedded or external, or on Kubernetes ConfigMaps or Leases, and the choice affects how elections and failover behave. Each node keeps its own flowfile, content and provenance repositories, so disk capacity and I/O on every node determine whether a failover is clean. Load-balanced connections move flowfiles between nodes, which means that a node failure can strand queued data unless the connection and its repositories are configured for it. Ask your team to name the owner of each of these four decisions before the first design review.
Components that make up a resilient NiFi cluster
A NiFi cluster is only as resilient as its weakest shared component. Coordination decides who leads, the flow configuration defines what every node runs, and the per-node repositories hold the data in flight. Each part fails differently, so each needs its own sizing and monitoring decisions.
Coordination layer
NiFi coordinates nodes through embedded or external ZooKeeper, or on Kubernetes through ConfigMaps or Leases for state and leader election. The choice sets your operational footprint: an external ZooKeeper ensemble is another service to run, back up and patch, while Kubernetes options depend on the cluster's own API health. Confirm the approach against the administration guide for your release, and test what happens when the coordination service is unreachable from some nodes.
NiFi admin guideCluster coordinator
The cluster coordinator manages node membership, receives heartbeats and distributes the flow to nodes. Only one node holds this role at a time, so a coordinator failure triggers an election and a short period where membership changes pause. Check how quickly your coordination layer detects a dead coordinator, and whether your monitoring alerts on repeated elections, which usually signal network or resource problems rather than a single failed machine.
Primary node
The primary node runs processors that are scheduled to execute only on the primary, such as some ingestion or singleton tasks. If the primary fails, another node is elected and those processors restart there, so any work they hold in memory or in external state must be idempotent. Map every primary-only processor in your flow and decide how each one resumes after a failover.
Flow configuration file
The flow configuration file stores the dataflow definition, and in NiFi 2 it is flow.json.gz. Each node must hold a consistent copy, and a corrupted or mismatched file blocks a node from joining the cluster. Back it up before every change, keep the flow versioned outside the node, and check that restores have been tested rather than assumed.
Content and FlowFile repositories
The content repository holds the payload of each FlowFile, and the FlowFile repository holds the attributes and queue state. If either is lost, in-flight data is lost or replayed; if either is slow, every processor on the node slows down. Size them on separate, fast volumes, watch disk usage and I/O latency, and set back-pressure thresholds so a full disk does not silently stall the whole node.
Provenance and database repositories
The provenance repository records the lineage events for each FlowFile, and the database repository holds NiFi's operational state such as flow history and component records. Losing provenance removes the audit trail for affected data, and a slow provenance store can back up the event pipeline. Set retention deliberately against your audit requirements, and treat these repositories as data your compliance team may need to reproduce.
Choosing ZooKeeper, embedded coordination or Kubernetes leader election
An external ZooKeeper ensemble runs as its own service, separate from the NiFi nodes. It fits organizations that already operate ZooKeeper for other platforms, or that want coordination to survive independently of any single NiFi node's lifecycle. The ensemble is a dependency with its own quorum rules, storage, patching and monitoring, so the team that owns it needs a clear on-call path.
- Who runs it: the platform or messaging team usually owns the ensemble, and NiFi operators depend on their change calendar for upgrades.
- Upgrades: ZooKeeper and NiFi are upgraded on separate schedules, so compatibility between versions must be checked for each change.
- Network dependencies: every NiFi node must reach every ZooKeeper server, so firewall rules, DNS and latency between the two tiers become part of the design.
- Failure handling: losing ZooKeeper quorum stops coordination for the cluster, and the failure domain extends to the ensemble's own zones and hosts.
- Ensemble sizing: an odd number of servers is standard, and the number and placement should be confirmed against the ZooKeeper guidance for your version.
Before committing, confirm the connection string, authentication and state paths in the NiFi administration guide for your exact release, and ask the ZooKeeper owner for their own recovery runbook.
Embedded ZooKeeper runs inside the NiFi nodes, so the cluster has no separate ensemble to deploy. It suits smaller clusters, lab and test environments, and teams that do not operate ZooKeeper elsewhere. The trade-off is that coordination is tied to the NiFi nodes themselves, so node maintenance and node failures touch the coordination layer directly.
- Who runs it: the NiFi team owns it, which removes a separate on-call dependency but concentrates responsibility.
- Upgrades: coordination changes ship with NiFi upgrades, so the upgrade plan covers both at once.
- Network dependencies: the cluster still needs reliable node-to-node connectivity, but there is no extra service tier to reach.
- Failure handling: if enough embedded members are lost, the remaining nodes may lose quorum, which is why the number of nodes and their spread across failure zones matter.
- Operational scope: the team should confirm how many nodes the embedded option is designed to support in the administration guide for its version.
Confirm with the NiFi administration guide for your release how embedded coordination is configured and where its state is stored, and test node loss in a non-production cluster before relying on it.
On Kubernetes, NiFi can use ConfigMaps or Leases for cluster state and leader election, which removes the need for a ZooKeeper ensemble. This fits teams already running NiFi in Kubernetes with strong cluster administration skills. Coordination then depends on the Kubernetes API server and its etcd store, so the platform team's control plane health becomes part of NiFi availability.
- Who runs it: the platform team owns the cluster control plane, while the NiFi team owns the NiFi configuration and its RBAC permissions.
- Upgrades: Kubernetes version upgrades must be checked against the NiFi release for compatibility, and they can affect leader election timing.
- Network dependencies: nodes must reach the API server, and access to the ConfigMap or Lease objects must be scoped by RBAC.
- Failure handling: API server unavailability or etcd problems affect coordination, and pod rescheduling events can cause primary node changes that operators should expect.
- Storage: repository volumes and their persistence are a separate concern covered in the Kubernetes section of this topic.
Confirm with the NiFi administration guide for your release which Kubernetes state mechanism is supported, the required RBAC rules, and the expected behavior during pod restarts.
Building the cluster in sequence
This sequence takes a set of identical NiFi nodes from a bare runtime to a cluster in which every node has joined, shares coordination state and can accept load-balanced flow files. Each step ends with a check so that a failure is caught before the next layer is added.
Confirm runtime and identical node builds
The platform team confirms that every node has Java 21 installed, since the NiFi administration guide lists it as the minimum runtime, and that all nodes run the same NiFi 2 version with the same configuration baseline. Hosts should match in JVM settings, operating system patches and time synchronization so that behavior does not differ by node. Done means a version and Java check returns the same output on every host, recorded in the build notes.
Set up the coordination layer
Choose between an embedded or external ZooKeeper ensemble and Kubernetes-based coordination using ConfigMaps or Leases, as described in the NiFi administration guide. Decide this early because it determines how leader election, cluster state and node membership are stored and what the operations team must monitor. Done means the chosen coordination service is reachable from every node and its health is confirmed before NiFi starts.
Configure cluster and node addresses
Set the cluster properties in nifi.properties on each node, including the node's own address, the cluster protocol port, the web address and the coordination connection string. Node addresses must resolve consistently in both directions, because nodes contact each other directly for cluster protocol traffic. Done means each node's configured address resolves correctly from every other node, and name resolution tests pass in both directions.
Enable TLS between nodes and for the UI
Provision certificates for the web interface and for node-to-node communication, then set the keystore and truststore properties on every node. Leaving the loopback default in place will keep the UI unreachable from other hosts, so the security configuration must be completed before the cluster is exposed to users. Done means each node serves HTTPS with a certificate the other nodes trust, and a handshake from one node to another succeeds.
Size and mount repositories on separate storage
Mount the flow file, content, provenance and database repositories on separate volumes so that a busy provenance store cannot starve the flow file repository. Sizing depends on expected throughput, retention and content size, so ask the team to document these inputs before choosing volume capacity and I/O characteristics. Done means each repository path is on its intended volume, write permissions are correct for the NiFi service account, and free space is recorded against the retention plan.
Configure load-balanced connections
On the connections that need distribution across the cluster, set the load balancing strategy and the load balancing partition attribute where ordering or affinity matters. The strategy choice controls whether flow files spread evenly or stay grouped by attribute, and it should be validated against the downstream processors' expectations. Done means each load-balanced connection shows its chosen strategy in the flow, and a test flow file's distribution across nodes matches the intended behavior.
Start nodes and confirm they join
Start the nodes one at a time, watching the logs for coordination and cluster protocol errors before starting the next. Once all nodes are running, open the cluster view in the UI and confirm that every node shows as connected and that a single coordinator is elected. Done means the cluster view lists every expected node as connected, and a test flow runs on all nodes without disconnections during a short observation window.
Sizing nodes and repository storage for failover
Node count alone does not set failover capacity. Each NiFi node in a cluster processes its share of the flow, so throughput depends on how much CPU, memory and disk each node has and how those resources are shared with the other nodes. When a node fails, the survivors absorb its load, so each remaining node must be able to carry more than its normal share without queues growing until backpressure slows upstream sources. Size for the workload after one node is gone, not for the healthy cluster. Confirm the minimum node count you need for quorum and for the peak load you expect, then test the cluster with one node stopped during a realistic load run.
Repositories sit at the center of this sizing. NiFi keeps FlowFile content, FlowFile state and provenance data in local repositories on each node, and queues back up on disk when downstream processors slow down. Put the content, FlowFile and provenance repositories on fast, separate volumes so that a burst of queued data in one repository does not starve the others, and so that a node rejoining the cluster can catch up on its backlog without competing with live traffic. Ask your storage team to confirm latency and throughput figures for those volumes under sustained write load, and treat provenance retention as a sizing input rather than an afterthought.
Losing a node's local repositories changes recovery more than losing the process itself. A restarted node with its repositories intact resumes its queued FlowFiles, while a node rebuilt on fresh disks has no local content or state for the data it held, so those FlowFiles are lost unless upstream sources can replay them. Decide before go-live which data can be replayed and which cannot, document the recovery steps for each case, and rehearse a node rebuild on a copy of the environment. Confirm the exact repository layout and recovery behavior for your NiFi version in the System Administrator's Guide.
How a node failure flows through the cluster
The path starts when a client sends data through the load balancer to whichever NiFi node receives the connection. Each node writes flowfile content, FlowFile state and provenance to its own local repositories, while the coordination layer tracks cluster membership and which node holds the primary role. When one node drops, the coordinator marks it disconnected, and the remaining nodes continue processing its share of the work. Check that the load balancer stops routing to the failed node, that the primary role moved if it was held there, and that data stranded in the failed node's repositories is recovered once it returns.
Traffic reroutes and the primary role moves when a node drops out of the cluster.
What happens when a node, the coordinator or ZooKeeper fails
A NiFi cluster hides some failures from the flow and exposes others to it. Each case below separates what keeps running from what stalls, and what the operator must do, because clustering protects availability of the flow rather than every piece of data in flight.
A worker node goes down
The cluster marks the node disconnected and the remaining nodes continue processing their share of the work. FlowFiles queued on the failed node stay in its local repositories and are not moved automatically, so they wait until the node rejoins. Check how much data sits in that node's queues, whether load-balanced connections had already routed new work away from it, and whether the node will restart with its repositories intact. Confirm the rejoin procedure with your NiFi version's administration guide before you need it.
NiFi administration guideThe primary or coordinator goes down
The cluster elects a new primary node and new coordinator through the coordination mechanism you configured, either ZooKeeper or Kubernetes leases and ConfigMaps. Components scheduled to run only on the primary node pause during the change, and any work tied to that role must be checked after the switch. Operators should confirm that the election completed, that primary-only processors are running on the new primary, and that no flow was left stopped by the transition.
Loss of coordination quorum
When too few coordination members remain to agree on cluster state, the NiFi cluster cannot reliably elect a leader or accept membership changes. Whether the flow keeps moving depends on how the nodes handle the lost state, so do not assume processing continues normally. Operators should restore the coordination quorum first, then review the cluster view for disconnected or stale nodes. Ask your team to document the quorum size for ZooKeeper or your Kubernetes setup before go-live.
A full or slow repository disk
NiFi writes FlowFile, content and provenance data to local repositories on each node, so a full or slow disk on one node affects only that node but can still slow the whole cluster when connections depend on it. Backpressure may build up, and a node that cannot write may disconnect or degrade. Monitor repository disk usage and latency per node, size the storage for peak queues, and confirm how provenance retention is limited so it does not fill the disk unexpectedly.
A network partition between nodes
When nodes cannot reach each other but still run, the cluster may split its view of membership and state. Some nodes can continue working on data they hold, while others lose their coordinator connection and disconnect. Data may be duplicated or delayed once connectivity returns, so flows must tolerate reprocessing. Operators should verify node-to-node and coordination traffic paths, review how the cluster reconciles after the link returns, and test this scenario in a staging cluster rather than assuming the outcome.
What drives the effort of a NiFi high availability design
This table lists the factors that expand or shrink the work of designing a NiFi cluster, from environment count to team familiarity with ZooKeeper or Kubernetes. Read each row as a question to answer before quoting, and use the right-hand column to see which early choices keep the effort contained. The main takeaway is that standard node templates and early load tests usually reduce rework more than any single tuning step.
| Driver | Why it changes effort | How to keep it down |
|---|---|---|
| Number of environments | Each environment (dev, test, production, disaster recovery) needs its own cluster, certificates, coordination setup and tuning, so the design is repeated. | Define one node template and one parameterized deployment pattern, then vary only sizing and endpoints per environment. |
| Flow count and complexity | Many flows with long processor chains, large fan-out or heavy record processing raise the load each node carries and the number of connections to balance. | Inventory flows by throughput and state before sizing. Group flows by criticality so that the design covers the heaviest paths first. |
| Data volume and burstiness | Peak ingest, not average ingest, sets node count and repository storage. Bursts from upstream sources can fill queues and content repositories quickly. | Ask the source owners for peak rates and burst duration. Run a load test with recorded peaks early, before storage and node counts are fixed. |
| External integrations | Each database, message broker, API or object store adds failure modes, credentials, network rules and retry behavior that the cluster design must cover. | List integrations with their failure behavior and owner. Use controller services with shared configuration so each integration is configured once per environment. |
| Network and storage topology | Node placement across zones or data centers, load balancer design, and whether repositories sit on local or shared disks change failover behavior and recovery steps. | Agree the topology with network and storage teams in writing before design. Confirm the storage performance each repository needs with the storage team. |
| Compliance requirements for logs and provenance | Retention rules for provenance, bulletin and application logs determine repository size, backup scope and access controls for audit evidence. | Collect retention and access requirements from compliance owners early. Set provenance retention per flow class rather than one setting for all flows. |
| Team familiarity with ZooKeeper or Kubernetes | Coordination through embedded or external ZooKeeper, or Kubernetes Leases and ConfigMaps, needs operators who can diagnose leader election and state problems. Gaps add time to design reviews and incident response. | Choose the coordination model the team already runs. Schedule a short failover drill for the team before go-live, and document the runbook for each failure case. |
How HA design changes across deployment models
A single NiFi node has no cluster coordination, so it cannot fail over. It is useful for flow design, processor testing and parameter work, but any design decision made here about resilience is provisional. Because the default security configuration binds the UI to 127.0.0.1, a developer machine needs deliberate configuration before anyone else can reach the interface, and that setup is not a model for production clustering.
- No failover: a node restart or disk failure stops all flows until the node returns.
- Repositories on local disk: flowfile, content and provenance repositories sit on the same host, which is acceptable for test data only.
- Loopback-only UI by default: remote access requires explicit TLS and authentication settings that you will reuse later.
- Flow definitions as the artifact: keep the flow in version control so the same definition can move to a cluster.
- Sizing is not transferable: throughput measured on one laptop does not predict cluster capacity.
Before leaving this environment, confirm which configuration values will change for a cluster, such as node identities, repository paths and coordination settings, and record them in a deployment checklist.
A VM or data center cluster is where most of the HA design decisions are made. NiFi clusters can use an embedded or an external ZooKeeper ensemble for coordination, and the design choice affects how many machines you run, how they fail and who patches them. An external ensemble separates coordination from NiFi nodes, which means its own availability, time sync and network paths must be designed and monitored as well.
- Coordination placement: decide between embedded and external ZooKeeper, and place ensemble members on separate failure domains.
- Node placement: spread NiFi nodes across racks, hypervisor hosts or availability zones so one failure does not remove a quorum of nodes.
- Repository storage: give each node fast local disks for the repositories, and size them for the backlog you expect during a node outage.
- Load-balanced connections: configure a load balancer or DNS entry in front of the cluster so clients and source systems do not depend on one node.
- Node failure drills: rehearse loss of a node and loss of a ZooKeeper member, and record how long flows take to resume.
Confirm with your platform team how ZooKeeper upgrades and certificate rotation will be scheduled, because both affect every node at once.
On Kubernetes, NiFi can use ConfigMaps or Leases for cluster state and leader election instead of a separate ZooKeeper ensemble, according to the NiFi administration guide. This changes the failure model: the Kubernetes control plane, the API server and the storage class become part of NiFi's availability path, and pod rescheduling becomes a normal event that the flow must tolerate. The Kubernetes-specific build is covered in its own topic, so this tab focuses on what changes in HA design.
- Coordination through the cluster API: confirm the chosen mechanism (ConfigMaps or Leases) is supported by the NiFi version you are deploying and that the service account has the required permissions.
- Pod disruption and spread: use anti-affinity and disruption budgets so voluntary evictions cannot take down too many nodes at once.
- Persistent volumes: repositories must survive pod rescheduling, so confirm the storage class's behavior on node loss and its performance characteristics.
- Ingress and TLS: the load-balanced entry point is an ingress or service, and its certificates and session behavior must be tested with NiFi's UI and API.
- Scaling changes state: adding or removing nodes changes cluster membership, so plan these operations as controlled changes.
Confirm the exact coordination options and minimum versions for your NiFi release in the administration guide before choosing this model.
In an air-gapped network, every dependency the cluster needs at install and runtime must be mirrored inside the boundary. That includes the NiFi distribution, the Java runtime, any Python runtime used by optional Python-based processors, container images if you run on Kubernetes, and the coordination components you choose. Nothing in the HA design can assume that a package manager or public registry is reachable during an outage or a rebuild.
- Mirrored artifacts: maintain an internal copy of NiFi, its NARs, the Java 21 runtime and, where used, ZooKeeper or container images.
- Coordination without external calls: verify that the chosen coordination method works with no outbound network access.
- Recovery media: keep offline copies of certificates, keystores and sensitive property keys needed to restart nodes after a failure.
- Patch windows: a rolling upgrade needs the new artifacts staged in advance, so schedule mirror updates before each change window.
- Monitoring path: metrics and log shipping must stay inside the boundary and still reach the operations team during an incident.
Confirm with your security team which artifacts must be scanned and approved before they enter the network, because that approval cycle sets how quickly you can restore a failed node.
What NiFi clustering does not protect
Clustering is not a backup. A NiFi cluster keeps flow processing running when one node fails, but it does not protect the things that define and record the system. Back up the flow definition (flow.json.gz on the 2.x line), the FlowFile, content and provenance repositories where your retention needs them, and the sensitive property key that encrypts values in the flow. Losing the key can leave copies of the flow unreadable even when every node is healthy. Confirm with your team where each of these lives, how often they are copied off the cluster, and whether a restore has been tested on a separate host. Keep the key in a store separate from the flow backup.
A bad change reaches every node. Clustering replicates flow configuration across nodes, so an incorrect processor setting, a wrong routing rule or a deleted controller service is applied everywhere at once. Redundancy does not help here. Control changes through a review step, version flows in a registry, and keep a rollback path that has been rehearsed. Restrict who can modify the canvas using access policies, and confirm in a non-production cluster how a change is propagated and reverted before you rely on that procedure.
Data on a failed node is not guaranteed. FlowFiles held only in a failed node's local repositories may be unavailable until that node returns, and they may be lost if its storage is destroyed. Clustering does not remove this exposure on its own. Ask your DeployOpen or internal team to define the delivery guarantee for each flow, including what happens to in-flight data during node loss, and test it by stopping a node under realistic load. Also plan for upstream and downstream outages: a clustered NiFi still cannot make a stopped source redeliver, or a down target accept data. Use queue back-pressure, retries and dead-letter routing, and verify each behavior against your own flows, because the exact recovery path depends on the processors and the systems they call.
Securing cluster communication and node access
A NiFi cluster is only as protected as the traffic between its nodes, the coordination layer, and the paths administrators use to reach the UI and API. The cards below cover the controls that connect those paths, from the loopback default that must be replaced to the sensitive properties key that protects secrets in the flow.
Replace the loopback-only default
NiFi binds to 127.0.0.1 when no security configuration is provided, so the UI is reachable only through the loopback interface. Moving a cluster node to a routable address is a configuration change that must be made together with TLS and an access provider. Change the bind settings in a test cluster first, confirm each node can still reach the others and the coordination layer, and only then roll the change across production nodes in a planned window.
Administration guideTLS between nodes and coordination
Node-to-node traffic, cluster state exchange and connections to ZooKeeper or the Kubernetes API all need encryption and certificate validation. Decide early whether you run embedded ZooKeeper or an external ensemble, because that choice sets which certificates, trust stores and ports must be managed. Ask your team to document every certificate, its issuer, its owner and its renewal process before go-live.
Node identity for cluster membership
Each node presents an identity that the cluster must accept before it can join and take part in coordination. Node identities are typically granted explicit authorization in the cluster policies, so a node with a valid certificate still needs the right permissions. Plan how new nodes receive their identity during scale-out and how a decommissioned node's identity is revoked so it cannot rejoin.
UI and API access control
Access to the NiFi UI and REST API should be granted through an authentication provider, with policies that limit who can view, modify or administer flows. Single-user mode is not suitable for a shared cluster. Confirm which provider your organization will use and map roles to policies before opening the cluster to users. Identity integration details are covered in the SSO topic.
Protecting the sensitive properties key
NiFi encrypts sensitive processor and controller service properties, such as passwords and API tokens, using a sensitive properties key. Every node must hold the same key to read the flow, and losing it means the encrypted values cannot be recovered. Store the key in a secrets manager or a restricted file, back it up separately from the flow, and record who can read it and how a rotation would be performed.
Hardening checks before go-live
Before a cluster takes production traffic, verify that the UI and API accept only TLS connections, that inter-node ports are reachable only from other nodes, and that secrets do not appear in exported flow definitions or logs. Retain the results with the change record. Deeper hardening, including restricted components and provenance retention, is covered in the security hardening topic.
Administration guideHow to test that the cluster fails over as designed
A NiFi cluster is only highly available if you have watched it fail over under load. Before go-live, run a written test plan that starts by confirming every node joins the cluster and reports as connected in the UI, then records the baseline: flow file counts, queue depths, and the coordinator and primary node assignments. Keep the test flows representative of production, including the processors that hold state, the connections that are load-balanced, and any site-to-site or external calls. A green cluster with an idle flow proves very little.
Next, test node loss in steps. Stop one node at a time while representative load runs, and confirm that the surviving nodes take over the primary and coordinator roles, that load-balanced connections redistribute flow files, and that the stopped node rejoins cleanly when restarted. Then test the coordination layer separately. If you use embedded or external ZooKeeper, or Kubernetes Leases or ConfigMaps, stop members only within the quorum rules your chosen design defines, and confirm with the vendor documentation and your own environment which failures the design tolerates. Also simulate a slow repository disk, because a stalled content or provenance repository often fails differently from a dead node and can back up the whole flow.
For every test, verify what happened to data in flight. Compare sink output and provenance events with the baseline to check whether flow files were preserved, replayed or dropped, and match the result against what the flow design promises, such as idempotent writes or duplicate tolerance at the destination. Document each scenario with start and end times, observed behavior, logs and metrics, and a pass or fail decision against the stated expectation. Finally, agree a rollback path before go-live, including who can stop the flow, how to restore the previous flow version, and what to do with repositories and queued data if a fix fails. Treat missing results or an untested rollback as a go-live blocker.
Monitoring, backing up and upgrading an HA NiFi cluster
This table compares the operational areas of a clustered NiFi deployment: what to watch, what to back up, how rolling upgrades behave and what belongs in run books. Read each row as a question your team must answer before go-live, not as a finished setup. The main takeaway is that a cluster keeps running only if its coordination layer, repositories and configuration files are watched and restorable as separate items.
| Area | What to watch or keep | Why it matters for a cluster |
|---|---|---|
| Node connection state | Confirm each node shows as connected in the cluster view and alert when a node disconnects or stays in a pending state. | A disconnected node stops taking its share of work, so the remaining nodes absorb the load without anyone noticing unless an alert fires. |
| Repository fill levels | Track disk usage for the flowfile, content and provenance repositories on every node, separately, with alerts well before volumes fill. | A full repository can stop flow processing on that node, and repositories grow at different rates depending on flow design and retention settings. |
| Queue depth and backpressure | Watch connection queue counts and backpressure events, especially on load-balanced connections between nodes. | Growing queues show that a node or downstream system is slower than the flow expects, which often appears before a node fails. |
| Coordinator and primary node changes | Log every change of cluster coordinator and primary node, and confirm the new roles match what the run book expects. | Frequent role changes point to network instability or an unhealthy node, and some scheduled work runs only on the primary node. |
| Coordination layer health | Monitor ZooKeeper ensemble members or Kubernetes Lease and ConfigMap access, depending on which coordination method the cluster uses. | Clustering depends on this layer for leader election and shared state, so a coordination outage can affect the whole cluster even when every NiFi node is up. |
| Configuration and flow files | Back up the flow configuration file (flow.json.gz on NiFi 2), nifi.properties, authorizers and the sensitive property key, stored separately and access-controlled. | A lost sensitive property key makes encrypted values in the flow unreadable, and a lost flow file means rebuilding flows by hand. |
| Repositories and coordination data | Decide which repositories are backed up and at what interval, and whether ZooKeeper or Lease state is backed up or rebuilt from configuration. Test a restore on a separate environment. | Repository backups can be large and may hold data your retention rules restrict, so the decision should be explicit and documented, not assumed. |
| Rolling upgrades | Upgrade one node at a time, confirm it rejoins and the cluster is healthy before the next node, and rehearse the sequence in a non-production cluster first. Confirm the target version and any migration steps against the NiFi downloads page and migration guidance. | Mixed-version operation and deprecated components can break flows in ways that appear only under production load, so each step needs a check and a rollback point. |
| Run book contents | Document node names, coordination method, alert thresholds, backup schedule, restore steps, upgrade order, owners and escalation contacts. | During an incident, the people on call need the cluster's specific settings and recovery steps, which general NiFi documentation does not supply. |
Common questions about Apache NiFi clustering effort and cost
How much effort does a NiFi high availability design take?
The effort depends mainly on how many nodes the design needs, how many environments must match production, and how much of the surrounding infrastructure already exists. A design covers coordination (ZooKeeper or Kubernetes leader election), node sizing, repository storage layout, load-balanced connections, and a failure test plan for each node role. Each of these adds decisions that must be documented and tested. Teams with existing identity, storage and monitoring platforms usually spend less time than teams building those pieces alongside NiFi. Ask any partner to split its estimate by these components so you can see where the time goes.
Can our team design and build a NiFi cluster on its own?
Yes, if your team has Linux, JVM and network operations experience and can run tests against a non-production cluster. The Apache NiFi System Administrator's Guide covers the cluster settings, and the project is licensed under the Apache License 2.0, so there is no license fee to plan for. The harder parts are repeatable node builds, storage sizing for the content, flowfile and provenance repositories, and proving that a failed node does not lose or duplicate data in your flows. Many teams bring in outside help for the failure testing and the review, while keeping day-to-day ownership in house.
Is ZooKeeper or Kubernetes easier to run for NiFi clustering?
Neither option is simpler in every environment. NiFi can coordinate through ZooKeeper, either embedded or external, or on Kubernetes using ConfigMaps or Leases for state and leader election, according to the NiFi administration guide. ZooKeeper adds a separate ensemble that needs its own patching, monitoring and quorum planning. Kubernetes avoids that ensemble but requires your platform team to run the cluster, persistent volumes and ingress reliably. Choose the option your operations team already supports well, and test leader failover in that exact setup before you commit.
What does the work need from our team and infrastructure?
The work needs named owners on your side for several inputs before design starts. These include the target cloud account, data center or air-gapped network, DNS and certificate authority, identity provider for NiFi authentication, storage classes or volume provisioning, and monitoring and log collection. You will also need access to representative flows and sample data so that failover tests are meaningful. Delays usually come from waiting on these inputs, so agree on owners and lead times in the written scope.
How long does a NiFi clustering design and test cycle take?
The duration is driven by the number of environments, the coordination model chosen, the number of flows and their risk, and how many failure scenarios must be tested. A single production-like test cluster with a few flows moves faster than several environments with complex failover requirements. Time is also lost when infrastructure requests, certificate issuance or identity integration are not ready. Ask for a timeline that lists each test scenario, the environment it runs in, and the dependency it waits on, rather than a single end date.
Does NiFi clustering replace backups?
No. Clustering keeps the service running when a node fails, but it does not protect against deleted flows, corrupted repositories, bad configuration changes or a failed storage volume that is replicated to every node. A separate backup plan must cover the flow definition, the sensitive property keys needed to read encrypted settings, repository data where recovery requires it, and the configuration files. Test restores on a separate environment, because a backup you have never restored is not evidence of recovery. Confirm the retention and restore targets with your risk and compliance owners.
What does clustering not protect against in NiFi?
Clustering does not fix flows that are designed to lose data, sources that cannot be replayed, or downstream systems that cannot accept duplicates. It also does not protect a single-user login, a loopback-only UI binding that was never changed for production, or weak access policies. Engineers should check which processors are non-idempotent, which sources need persistent offsets, and how provenance and repository storage behave during node loss. These checks belong in the design review, not in a post-incident review.
Which NiFi versions should a new HA design target?
Design new clusters on NiFi 2, because the NiFi downloads page lists NiFi 1.28 as the last minor release of the version 1 series and strongly encourages users to upgrade to NiFi 2. NiFi 1.x cannot be maintained further because it depends on Jetty 9.4, Spring Framework 5.3 and AngularJS 1.8. Confirm the current NiFi 2 release and the Java 21 runtime requirement with the NiFi documentation before you fix the build. A design on 1.x adds migration work to the HA project, so the two should be scoped together.
How DeployOpen scopes, builds and hands over NiFi clusters
DeployOpen plans and builds Apache NiFi clusters inside your own cloud accounts, data centers or air-gapped networks. Each engagement starts from a written, fixed scope that names the coordination method, node layout, repository storage and failure tests before any cluster is built.
How we scope
- Written scope fixes the coordination method, ZooKeeper (embedded or external) or Kubernetes leases and ConfigMaps, before build starts.
- Scope lists node count, sizing assumptions and repository storage layout for each node in the cluster.
- Scope states which node failure, storage loss and upgrade scenarios will be tested and documented as acceptance criteria.
How we build
- We configure the cluster, load-balanced connections and TLS between nodes in your environment, using your change process.
- We run controlled failure tests, such as stopping a primary node and losing a repository volume, and record how flows recover.
- We check that the UI and API bind only to the interfaces your security configuration intends, not the loopback default.
How we hand over
- You receive runbooks covering cluster startup, node replacement, repository recovery and rolling restarts.
- Documentation records the configuration, the test results and the known limits of clustering for your flows.
- Handover includes a walkthrough with your platform and operations staff so they can run the cluster without us.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Ongoing support, upgrades and continuous testing for the cluster are available as a retainer.
- Retainer scope for the cluster is agreed in writing, and any changes to scope are documented before work proceeds.

