Apache NiFi

Apache NiFi implementation by DeployOpen: dataflow design, custom Java and Python processors, Git-versioned flows, secure clusters, SSO and migration from NiFi 1.x to 2.x.

On this page

What an Apache NiFi implementation involves

An Apache NiFi implementation turns an inventory of data sources and destinations into designed, secured and versioned dataflows on a cluster your team can run. DeployOpen covers flow design, custom processors, Git versioning, clustering, SSO and migration from NiFi 1.x to 2.x.

Apache NiFi is a dataflow automation platform licensed under the Apache License 2.0, as stated on the Apache NiFi downloads page. A FlowFile has key/value attributes and content of zero or more bytes. A connection acts as a queue between processors that can be prioritized and bounded to enable back pressure, as the NiFi Overview describes. Flows are built in a web UI from processors joined by connections. Controller services hold shared configuration such as database connection pools, SSL contexts and record readers and writers. Parameter contexts hold values that change between environments. Every FlowFile event is written to provenance, so operators can trace where a record came from and what happened to it.

A project starts with the data: sources, destinations, formats, volumes, delivery guarantees and who owns each feed. Design turns that inventory into process groups, record schemas, error routes and environment parameters. Custom processors fill the gaps. The rest is clustering, security, versioning and handover to the team that will run the flows.

Version choice shapes the plan. NiFi requires Java 21 according to the administration guide, and the Apache release catalog dates the 2.0.0 binaries 30 Oct 2024. The downloads page lists NiFi 2.13.0, released 2026-11-26. It names 1.28.1 as the latest 1.x release, calls 1.28 the last minor release of the version 1 series and gives 2024-12-08 as the end-of-support date. Critical bug fixes may still be considered for 1.x, but dependency upgrades are not included. New builds start on 2.x, and existing 1.x clusters need a migration plan.

Flow design decisions that keep a shared NiFi cluster maintainable

These choices decide how readable, testable and portable flows stay once many feeds share a cluster.

Process group structure

Use one process group per source, domain or delivery target, with input and output ports at the boundaries and a named owner for each group. Small groups with one job are easier to test, version and hand to a new team. Name groups after the data they move so an operator can find a failing feed quickly. Keep shared logic in its own group.

Record-oriented processing

Use record readers and writers with explicit schemas for JSON, CSV, Avro or Parquet. One processor then handles a whole batch, and schema changes are caught at the boundary. Hold schemas in a schema registry where you run one. Route records that fail validation to their own relationship so a single bad row does not block the batch. Keep reader and writer settings in shared controller services.

Parameters per environment

Hostnames, credentials and paths live in parameter contexts, so the same versioned flow runs in development, test and production. Per the NiFi User Guide, a process group uses only one parameter context, a group with no context does not inherit its parent's, and a parameter's sensitivity cannot change after creation. Parameter providers can pull secrets from HashiCorp Vault, AWS Secrets Manager, Azure Key Vault or Kubernetes secrets.

Back pressure and priority

Set queue thresholds so a slow destination slows its own feed and does not fill the content repository. The administration guide lists defaults of 10000 objects (nifi.queue.backpressure.count) and 1 GB (nifi.queue.backpressure.size). Adjust them for each connection from the size and rate of the FlowFiles on that path. Add prioritizers where order matters, and alert on queues that stay full.

Failure routes

Every failure relationship goes somewhere deliberate: a retry with a limit, a dead letter location for inspection, or an alert. Auto-terminating failures can hide data loss. Make each route visible on the canvas with a clear label, and test every one with malformed sample data before promotion. Review failure counts and bulletins after each release so a new error path does not stay silent.

Delivery guarantees

Agree with each consumer whether duplicates are acceptable and whether ordering matters. Then design idempotent writes or deduplication to match that agreement. Record the agreement next to the process group so later changes respect it. Provenance events show what was sent and when, which helps settle questions about missing or repeated records. Treat a change to the guarantee as a design change that needs review.

Building a custom NiFi processor in Java or Python

NiFi ships a large library of standard processors, and most builds still need a few components of their own for internal protocols, formats or business rules. DeployOpen builds custom processors in Java or Python, and the choice depends on how the component will be run and supported.

Java processors and services

  • Packaged as NAR files against the NiFi 2.x APIs on Java 21.
  • Built with the Maven Wrapper, as the NiFi GitHub repository does with ./mvnw install -T1C.
  • Controller services for shared clients and connection handling.
  • Unit tests with the nifi-mock TestRunner.

Python processors

  • FlowFileTransform, RecordTransform and FlowFileSource types, per the NiFi Python Developer Guide.
  • Python 3.10, 3.11 or 3.12 on each node, enabled by setting nifi.python.command. They are disabled by default, and the administration guide calls them beta and not recommended for production.
  • A separate virtual environment per processor type, with dependencies from PyPI, or a NAR package for air-gapped hosts.

Integrations

  • Kafka, databases, object storage, SFTP and HTTP APIs with standard processors.
  • Site-to-site transfers between clusters and edge agents.
  • Schema registries for record formats where you run one.

Flow testing

  • Sample data for each feed, including malformed records.
  • Flows exercised in a test cluster before promotion.
  • Throughput checks at expected peaks.
  • Custom components retested on a staging cluster before each NiFi upgrade.

Version NiFi flows in Git with a flow registry client and promote them

NiFi 2 includes Git-based Flow Registry Clients for GitHub, GitLab, Bitbucket and Azure DevOps. A process group under version control is saved as a flow definition in a repository. Teams can review changes, branch and roll back with the tools they already use for code.

The separate NiFi Registry application is deprecated. The release notes record the deprecation in NiFi 2.8.0, and the downloads page says it is planned for removal in NiFi 3.0 and recommends Git-based Flow Registry Clients instead. Teams that use NiFi Registry today should plan to move their buckets and flow history to a Git-based client.

Promotion works best when flows never contain environment values. Development changes are committed from a development cluster and reviewed. They are then imported or upgraded in test and production, where each environment binds its own parameter context.

Git history is not the only safety net. The flow.json.gz archive is enabled by default in ./conf/archive, with a 30 day and 500 MB default limit when no limits are set. Keep the repository as the source of truth for flow definitions and treat the archive as a local fallback.

Apache NiFi cluster setup: coordination and repository design

NiFi clustering has been zero-leader since NiFi 1.0. Every node runs the same flow on its own share of the data, and changes made on any node replicate to all nodes. Disk layout matters as much as CPU and memory.

AreaWhat it holds or doesDesign notes
CoordinationZooKeeper elects the cluster coordinator and primary node and stores shared component state.The default election implementation is CuratorLeaderElectionManager. The administration guide advises running ZooKeeper on 3 or 5 nodes.
Kubernetes coordinationNiFi 2 can use Kubernetes Leases for election and a ConfigMap state provider, with no ZooKeeper.Set nifi.cluster.leader.election.implementation to KubernetesLeaderElectionManager. Each cluster sharing a namespace needs a unique lease prefix, and the ConfigMap state provider limits stored data to 1 MB.
FlowFile repositoryFlowFile attributes and queue state, kept in a persistent write-ahead log by default.Use a fast, dedicated disk. Losing it loses track of data in flight.
Content repositoryThe payload bytes for data in flight and recently processed.Usually the largest. Size it for peak backlog with headroom, on separate disks from the other repositories. Archiving is on by default with a 7 day maximum retention and a 50% maximum usage percentage. The NiFi Overview gives a conservative estimate of about 50 MB/s per modest disk or RAID volume, and throughput scales roughly linearly with each added content repository partition.
Provenance repositoryIndexed, searchable event history for every FlowFile.The default is WriteAheadProvenanceRepository with 30 days and 10 GB of retention. Set retention by time and size to match investigation and audit needs.
Load distributionSpreads data across nodes through load-balanced connections.Use it after sources that run on the primary node only, such as listing processors. The cluster load balance port defaults to 6342.
Flow archiveKeeps earlier copies of flow.json.gz in ./conf/archive.Default limits are 30 days and 500 MB when none are set. Back it up with the rest of the configuration.

Security hardening, OIDC authentication and the sensitive props key

Without security configuration NiFi binds to 127.0.0.1. A default secured install serves HTTPS on port 8443 with a self-signed certificate. Single User is the default login provider, with a random 36 character UUID username and a generated 32 character password stored as a bcrypt hash, as the administration guide describes. That setup is suitable only for evaluation. Production clusters need certificates from your CA for the UI and for node-to-node traffic, and an identity provider for users. Keystore and truststore types can be BCFKS, JKS, PEM or PKCS12.

NiFi supports LDAP, OpenID Connect, SAML, JSON Web Tokens and X.509 client certificates, and runs only one login strategy at a time. OIDC is configured with nifi.security.user.oidc.discovery.url, client.id and client.secret. SAML uses nifi.security.user.saml.idp.metadata.url and sp.entity.id. Administrators and flow developers can then sign in through Keycloak, Microsoft Entra ID or your directory. The Kerberos login provider is deprecated for removal. Map groups from your identity provider to NiFi access policies for viewing, modifying and operating flows.

NiFi 2.12.0 deprecated fine-grained Process Group and Component authorization for removal, and it also deprecated AbstractPolicyBasedAuthorizer, according to the release notes. Designs that give each team access to only its own process groups in a shared cluster should account for this, for example with separate clusters for teams with different access needs.

Sensitive properties such as passwords and tokens are encrypted on disk with a key derived from nifi.sensitive.props.key. It must be at least 12 characters for the strong encryption options, and every clustered node must use the same value. Set it explicitly, store it in your secrets manager and back it up apart from the flow, since the flow cannot be decrypted without it.

Apache NiFi 2.0 migration: moving from 1.x to 2.x

The migration guidance says a cluster must reach NiFi 1.27.0 before it moves to 2.0.0. NiFi 1.28.1 is the latest 1.x release and 1.28 is the last minor release of the series, so the upgrade is a planned project with a fixed end. Start with an inventory of every flow, custom NAR and scripted component on the 1.x cluster. Check each item against the list of deprecated and removed components. Record the owner, source, destination and volume for each flow, since that record drives the order of cutover. Confirm that every node can run Java 21 before any other work begins.

Apache NiFi questions on support, Docker, Kubernetes and operations

What is the Apache NiFi 1.x to 2.x upgrade path?

The migration guidance requires an upgrade to NiFi 1.27.0 before moving to 2.0.0. After that, replace templates and variables with versioned flows and parameters, rebuild custom NARs against the 2.x APIs on Java 21, and review removed and renamed components. Running a new 2.x cluster beside the old one and moving flows group by group keeps rollback simple.

Is Apache NiFi support still available for 1.x?

The downloads page lists 1.28.1 as the latest 1.x release and gives 2024-12-08 as the end-of-support date. Critical bug fixes may still be considered for 1.x, but dependency upgrades are not included. Version 2.13.0 was released on 2026-11-26. New builds should start on 2.x, and existing 1.x clusters need a dated migration plan.

How does Apache NiFi cluster setup work on Kubernetes?

Set nifi.cluster.leader.election.implementation to KubernetesLeaderElectionManager, which manages Kubernetes Leases for coordination and primary node tracking, so ZooKeeper is not needed. Each NiFi cluster sharing a namespace needs a unique lease prefix. The ConfigMap State Provider limits stored data to 1 MB, so keep component state small and plan storage for the repositories separately.

Can we use Apache NiFi in Docker to learn it?

The apache/nifi image runs standalone, unsecured or with Single User, mutual TLS or LDAP authentication. The minimal command is docker run --name nifi -p 8443:8443 -d apache/nifi:latest. Documented variables include SINGLE_USER_CREDENTIALS_USERNAME and PASSWORD (at least 12 characters), AUTH, NIFI_JVM_HEAP_INIT and NIFI_JVM_HEAP_MAX. It suits learning flow design. Production clusters still need the security and repository design above.

How does Apache NiFi back pressure work?

Each connection is a queue that can be bounded. When a queue reaches its object count or data size threshold, the upstream processor stops being scheduled until the queue drains. Defaults are 10000 objects and 1 GB. A slow destination therefore slows its own feed. Set thresholds per connection and alert on queues that stay full, before the content repository fills.

What do we back up, and why does the sensitive props key matter?

Back up the flow definition (flow.json.gz), configuration files, certificates and the nifi.sensitive.props.key value, with flows also versioned in Git. The flow cannot be decrypted without the key, and every clustered node must use the same one. Repositories hold data in flight, so protect them with resilient disks and drain queues before planned maintenance.

What do we monitor, and how do upgrades work?

Monitor queue depths, bulletins, repository disk usage, JVM heap and node connection state, and alert before the content repository fills. For upgrades, read the release notes for deprecations, test custom NARs and Python processors on a staging cluster, then upgrade production in a planned window after draining queues. Keep the previous binaries and configuration for rollback.

Who owns the flows, and how do we roll out and train the team?

Each process group has a business owner and a technical owner who handle failures and schema changes. The platform team runs the cluster, certificates and upgrades, and security reviews access policies and parameter providers. Start with one or two feeds, run them beside the existing pipeline until counts match, then add feeds in batches. Train developers on conventions and Git workflows, and operators on queues, provenance and bulletins.

Scope, effort and handover for NiFi implementation services

Effort depends on the number of sources and destinations, data volumes, custom components, whether a 1.x migration or a NiFi Registry move is in scope, Kubernetes or VM hosting, and availability targets. Each of these is settled during the data inventory, before design starts.

DeployOpen maps your data sources, designs flow structure and conventions, and builds custom processors in Java or Python. It deploys and secures the cluster in your infrastructure, integrates SSO, sets up Git-based flow versioning and runs migrations from 1.x.

DeployOpen can also assess the platform against SOC 2, ISO 27001, DORA or NIS2 controls. We do not issue audit reports or certifications.

Handover includes flows and component code in your repositories, the design guide, the parameter and secret inventory, cluster configuration, upgrade and recovery runbooks, monitoring dashboards, and named owners for each feed and for the platform.

Sources and further reading

More on Apache NiFi

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.