Migrating a Hyperledger Fabric ordering service from Kafka to Raft

Kafka ordering must move to Raft before any Fabric v3.x upgrade, and the migration is one way, needs downtime and covers every channel. This page explains what the move involves, what to back up and how to plan the window.

On this page

Why a Hyperledger Fabric Kafka to Raft migration comes before any v3 upgrade

If your consortium network still runs Kafka ordering and must reach the 3.x line, you have to move every channel to Raft first. Fabric v3.0 removed Kafka consensus, so a Kafka network cannot be upgraded to v3 until its ordering service has been migrated, and the migration itself is one way and requires downtime. Once the orderers switch to Raft, there is no supported path back to Kafka, and recovery from a failed attempt depends on having taken the backup at the point the procedure prescribes.

The effort is hard to pin down from the outside and depends on three things: how many channels the network runs, how many ordering and peer organizations must coordinate their configuration updates, and how many times your team has rehearsed the steps on a copy of the network. Every channel must be converted inside the same maintenance window, so a network with many channels and many organizations has more sign-offs, more configuration transactions to check and a longer window to plan. Ask any partner to base a quote on a written inventory of channels, organizations and ordering nodes, and to state how many rehearsal runs the scope includes. Confirm the exact prerequisites for your current release against the Fabric v2.5 Kafka to Raft guide before committing a date.

Fabric v2.5 remains the long-term support line for production users, and the project publishes patch releases for both 3.x and 2.5 in parallel, including v3.1.5 and v2.5.16. That gives you a stable place to stop while the migration is planned, but it does not change the order of work: a Kafka network moves to Raft on its current release, and the v3 upgrade follows as a separate project. Treat the two as separate change windows with their own backups and sign-offs.

What maps cleanly from Kafka ordering to Raft and what does not

This table compares how Kafka and Raft ordering differ across consenter identity, channel configuration, endpoints, storage and tooling. Read the right-hand column as the work your team must plan for, and treat the items marked to confirm as checks against the Fabric docs for your exact version.

AreaKafka orderingRaft ordering after migration
Channel state and ledgerLedger blocks and channel state already on the orderers carry over to Raft as part of the migrationSame channel history continues on Raft; the migration changes consensus metadata, not the channel's transactions
Consensus metadataKafka brokers and topic configuration hold ordering position for each channelRaft consenter set and metadata are written into each channel's configuration by configuration update transactions
Consenter identity and TLSOrderers are identified by MSP and TLS certificates in the channel configurationEvery consenter needs its TLS certificate listed in the consenter set; confirm certificate paths and expiry for each node before the window
Ordering endpointsClients and peers connect to orderer endpoints defined in channel configurationEndpoint layout should be reviewed with the consenter set; confirm the endpoints each channel publishes after the switch
Channel scopeKafka channels can be inspected and changed one at a time in normal operationsMigration applies to all channels in one maintenance window and cannot be applied to a subset of channels
RecoveryBackup is a normal operational practice, not a gate on changing consensus typeRollback is not available once the change is made; recovery depends on a backup taken at the prescribed point
Operator toolingKafka cluster operations run alongside Fabric orderer operationsKafka brokers and their monitoring leave the runbook; confirm the Raft tooling and osnadmin steps for your version
Upgrade dependencyKafka consensus must be removed before any Fabric v3.x upgradeRaft is the required ordering type for v3.x networks; confirm the prerequisite node and channel versions in the Fabric docs

Documented paths and tools for the Kafka to Raft move

Fabric documents one supported route for moving Kafka ordering to Raft: configuration update transactions applied to each channel, bracketed by a backup and followed by node checks. The cards below cover the guide, the backup step, the verification endpoints and the version floor, and they show what the move does and does not depend on.

Configuration update transactions per channel

The migration is carried out as a series of configuration update transactions on each channel, not as a data import. Each channel's consenter set, consensus type and metadata are changed through these transactions, so the work is reviewed and signed like any other channel configuration change. Before you start, list every channel, confirm which organizations must sign each update, and confirm that your admin identities can submit them. Check that no channel is missed, because the move covers all channels in the same window.

Minimum node version
v1.4.2
Fabric v2.5 migration guide

The Fabric v2.5 Kafka to Raft guide

The v2.5 guide is the procedure your runbook should follow line by line. It sets out the five phases: maintenance mode, stop and back up, change consensus type and metadata, restart on Raft and verify, then leave maintenance mode. Have each operator mark the phase they are in, and record the exact command outputs at each step so the sequence can be audited afterward. Use the guide for the release your network runs, and do not mix steps from other versions.

Read the v2.5 guide

Backup at the prescribed point

The backup is the only documented route back if the migration fails, and recovery is possible only from a backup taken at the point the guide prescribes. Take ledger and MSP backups after the orderers are stopped and before consensus metadata changes. Store the copies off the ordering nodes, and test that a restore is possible on a separate host before you proceed. The upgrade guide describes the same backup of ledger and MSPs as the first step of a later upgrade, so the backup routine can be reused.

Fabric upgrade guide

Operations service endpoints for verification

After each orderer restarts on Raft, the operations service gives you the checks to confirm the node is healthy. The /healthz endpoint reports node health, /version confirms the binary level, and /logspec lets you raise log detail while you investigate. Metrics are exposed on /metrics for Prometheus or pushed through StatsD. These endpoints are protected by mutual TLS client certificates, so confirm that your monitoring identities are issued and trusted before the window opens.

Operations service docs

Node version floor and no third-party importer

Only nodes at v1.4.2 or higher can use the documented migration, so check every orderer and peer version before planning the window. The migration is carried out with Fabric's own configuration transactions and tools, and no third-party importer or converter is involved. Treat any vendor tool that claims to convert ledgers or consenter data as outside the documented path, and ask it for the Fabric version and procedure it supports before you consider it.

Fabric releases

Upgrade ordering after the move

The migration to Raft is a prerequisite for the v3.x upgrade, because v3.0 removed Kafka consensus. Keep the Kafka to Raft window separate from binary upgrades so that a problem in one can be isolated from the other. Confirm the current release lines before you schedule anything: v3.1.5 and v2.5.16 both shipped on June 18, 2026, and the 2.5 line is the long-term support release for production users.

Fabric what's new

How the five-phase migration sequence runs with rehearsal and cutover

The sequence turns a live Kafka-ordered network into a Raft-ordered one channel by channel, with a rehearsal and a verified backup standing in for the parallel run that a one-way migration does not allow.

  1. Inventory channels, consenters and node versions

    Before any change, list every application channel, the ordering nodes that serve each one, the Kafka brokers and ZooKeeper or KRaft settings behind them, and the Fabric version on every orderer and peer. The migration requires nodes at v1.4.2 or higher, so confirm that first. Record the consenter set each channel uses, because the Raft consenter metadata must be built from it. The step is done when the inventory is signed off by every ordering organization and each channel has a named owner.

  2. Rehearse the migration on a non-production copy

    Build a copy of the network with the same channels, organizations and orderer layout, then run the full sequence on it, including the configuration update transactions, the restart and the verification checks. Time each phase and record every error, retry and manual correction. The rehearsal is the only dry run available, because the production migration cannot be reversed to a pre-migration state except through the backup. The step is done when the runbook has been executed end to end on the copy with no unresolved steps, and the rollback plan has been exercised on the same copy.

  3. Enter maintenance mode on all channels

    Put every channel into maintenance mode through configuration updates so that no new transactions are ordered during the window. Confirm on each channel that the config block reflects maintenance mode before continuing. Because the migration must cover all channels in one maintenance window, a channel left out at this point blocks the rest. The step is done when every channel reports maintenance mode and no client traffic reaches the ordering service.

  4. Stop the ordering nodes and take the backup

    Stop the orderers and the Kafka-side components in the order the runbook sets, then take the backup at the prescribed point, which covers the ledger and MSP material the documentation requires. Store the backup off the hosts being changed and confirm it can be read and restored on a separate machine. Recovery from a failed migration depends on this backup being taken at the prescribed point, so a backup taken earlier or later does not substitute for it. The step is done when the backup is verified, checksummed and stored in a location the change does not touch.

  5. Change consensus type and metadata per channel

    Submit the configuration update transactions that change each channel's consensus type from Kafka to etcdraft and write the Raft consenter metadata, including the consenter certificates and endpoints. Work through the channels in the order the runbook defines and check each committed config block before starting the next. Note that each channel is changed through its own transactions, so a mistake in one channel's metadata has to be resolved before the window closes. The step is done when every channel's latest config block shows the Raft consensus type and the expected consenter set.

  6. Restart orderers on Raft and verify each channel

    Restart the ordering nodes so they come up with Raft as the consensus mechanism, then confirm that each channel elects a leader and that a majority of consenters is reachable. Check the operations service endpoints for health and logs, and confirm the peers can fetch blocks from the new ordering service. Submit a test transaction on each channel and confirm it commits on the peers. The step is done when every channel has a leader, passes the test transaction and shows healthy orderer status.

  7. Leave maintenance mode and resume traffic

    Once verification passes on every channel, submit the configuration updates that take the channels out of maintenance mode, then allow client applications to resume submitting transactions. Watch ordering throughput, error rates and peer block delivery during the first period of normal traffic. The step is done when all channels accept normal transactions and the change record captures the final consenter sets, block heights and the backup reference.

  8. Plan the 3.x upgrade from the Raft network

    With the network on Raft, plan the upgrade to the 3.x line as a separate change. The upgrade guide sets the order: back up the ledger and MSPs, upgrade orderer binaries in a rolling fashion, upgrade peer binaries in a rolling fashion, then update application channel capability levels. Confirm with your vendor or the documentation that the chaincode lifecycle prerequisites are met and that the 2.5 LTS line is the right stopping point if the 3.x upgrade is not yet scheduled. The step is done when the upgrade plan has its own rehearsal, backup point and rollback criteria.

Why the one-way, all-channels constraint shapes the maintenance window

The one-way, all-channels constraint is the fact that most shapes the window. Kafka to Raft is a one-way migration that must cover every channel in the same maintenance window, and it can be recovered from failure only if a backup was taken at the prescribed point. Treat the window as a single indivisible change: there is no safe state where some channels run on Raft and others still run on Kafka, and no partial migration to fall back on. Because the move is also a prerequisite for upgrading to v3.x, a network that cannot finish it cannot move forward on its planned upgrade path either.

Governance sign-off has to come before the window opens, and it has to span both the ordering organizations and the peer organizations, since every channel's configuration changes and every channel member is affected by the downtime. Confirm in writing which channels are in scope, which organizations hold consenter and admin roles on each, who approves the consensus type change on each channel, and who can declare a rollback decision if verification fails. Agree the backup location, who takes it, who verifies it can be restored, and the exact point in the procedure where it is taken. Also confirm that every ordering node is at a version that supports the migration, as described in the Fabric v2.5 Kafka to Raft guide.

Plan the window around the single point of no return and avoid assuming that a failed migration can be repaired in place. Ask your team and your ordering partners to rehearse the restore from the backup on a non-production copy before the window, and confirm who holds the authority to stop the procedure. Get the list of channels, the operator for each step, and the communication path to every member organization fixed on paper, because a missed channel or an unreachable approver is the most likely way a one-way change becomes a stalled one.

What drives the cost and duration of a Kafka to Raft migration

This table compares the main cost and duration drivers of a Kafka to Raft migration, who pays for each one, and whether it is a one-time or recurring cost. Use it to see which inputs your quote should depend on before you ask a partner for a price. The main takeaway is that channel count, organization coordination and rehearsal depth shape the schedule more than the technical switch itself.

DriverWho pays or carries itOne-time or recurringWhat to request or confirm in a quote
Channel count and channel configurationNetwork operator pays for the planning and configuration update transactions on every channelOne-timeItemized list of every channel, its members and the number of config update transactions planned per channel
Ordering and peer organizations to coordinateEach organization pays its own staff time for approvals, change windows and verificationOne-timeNamed contacts per organization and who signs off each maintenance step
Consenter TLS and identity readinessEach ordering organization pays to confirm certificates, MSP material and consenter endpoints before the windowOne-time, with renewal laterChecklist of consenter certificates, their expiry dates and who issues replacements if any are missing
Rehearsal depthOperator and partner share the cost of running the procedure in a non-production copy of the networkOne-timeWhether a full rehearsal on a staging network with all channels is included, and what evidence the rehearsal produces
Backup size and storageNetwork operator pays for storage capacity and for the time to take and verify the prescribed backupOne-time for the backup, recurring for retentionEstimated ledger and MSP backup size per node, storage location and retention period
Kafka and orderer hostingNetwork operator pays for the Kafka cluster and orderer nodes that stay running during the window and afterwardRecurring while Kafka runs, then retiredPlan for when Kafka is decommissioned and whether it is kept read-only for recovery
Maintenance window and approval cyclesEach organization's change board sets the timing, which can extend the calendar well beyond the technical workOne-timeRequired lead time for approvals and whether the quote assumes one or several change windows
Rollback and recovery planningNetwork operator pays for recovery drills, since recovery from failure depends on the backup taken at the prescribed pointOne-time, with ongoing backup routineWritten recovery procedure, who runs it and how it is tested before the window
Post-migration verification and supportPartner or internal team pays to verify Raft ordering and leave maintenance modeOne-time, with optional retainer afterwardVerification steps, acceptance criteria and whether support after the window is in scope

What usually goes wrong during a Fabric ordering migration

The Kafka to Raft migration has little room for error because it is one way, covers every channel in one window, and can only be recovered from a backup taken at the prescribed point. The risks below cluster around preparation, the window itself, and what happens when nodes come back. Each one has a check that should be completed before the maintenance window opens.

Backup taken at the wrong point

A backup taken outside the prescribed point cannot be used to recover from a failed migration. Teams often take a routine ledger backup days earlier, or back up only the peers, then discover mid-window that orderer state has moved on. Confirm the exact backup step in the Kafka to Raft guide for your Fabric version, take the backup after the orderers are stopped as the procedure directs, and test that the archive can be read before you change any consensus metadata.

Migration guide

A channel left out of the window

The migration must cover all channels in the same maintenance window, so a channel that is forgotten, excluded for a later date, or skipped because it looks inactive leaves the ordering service split between two consensus types. Build a written inventory of every application channel and the system channel from the current orderer configuration before the window is booked. Require sign-off from each ordering and member organization that its channels are on the list.

Consenter certificates not ready

Raft consenters are identified by their TLS certificates, and those must be in the channel configuration before the switch. If a consenter's certificate is expired, issued by the wrong CA, or was never added to the consenter set, the cluster can fail to form after restart. Check each orderer's TLS certificate validity and subject, confirm the certificate paths that the orderer will load, and dry run the consenter list with every operator present.

Orderer endpoints misconfigured after restart

Once orderers restart on Raft, peers and clients must reach the right ordering endpoints, and a mismatch in host, port or TLS settings can stall transaction submission even though the cluster is healthy. Compare each orderer's listen address, advertised endpoint and channel-level endpoint entries against the planned layout. Verify that peers connect to the expected orderers before declaring the window closed.

Nodes returned to service unverified

Under time pressure, teams bring orderers or peers back into normal traffic as soon as the process starts, before block production, leader election and block delivery have been checked. A node that is running but not replicating can accept load and hide the fault until the next outage. Use the operations service health endpoint and the node logs to confirm each orderer is in sync on every channel before leaving maintenance mode.

Operations service docs

Skipping the 3.x prerequisite check

Kafka consensus was removed in Fabric v3.0, so a network that has not completed the migration cannot move to 3.x, even if its binaries are upgraded and its peers run correctly. Teams sometimes treat the migration as optional housekeeping and schedule the 3.x upgrade first. Make the Raft switch on every channel a formal gate in the upgrade plan, and record its verification evidence before any v3 binary is deployed.

Upgrade guide

Questions buyers ask before moving Fabric ordering from Kafka to Raft

What drives the cost of a Kafka to Raft migration?

The cost depends mostly on how many channels the network runs, how many ordering nodes and organizations are involved, and how much preparation the network team already has in place. Every channel must be converted through its own series of configuration update transactions, and all of them must finish inside one maintenance window, so the work scales with channel count and with the number of parties who must sign each update. Costs fall into two groups. One-time costs include planning, rehearsal on a non-production network, the backup, the conversion itself and verification. Recurring costs come afterward, when the Raft cluster is operated and monitored. Ask any partner for a quote that lists channels, ordering organizations, environments to rehearse in and who signs for each party. No figure is given here because none was supplied for this migration.

How long does the maintenance window need to be?

The window length depends on the number of channels, the size of the ordering cluster, how quickly every organization can sign configuration updates, and how thoroughly the team has rehearsed. Kafka to Raft migration requires downtime and must cover all channels in the same window, so one slow approval can extend the whole change. The migration itself runs in five phases: enter maintenance mode, stop and back up, change the consensus type and metadata, restart on Raft and verify, then leave maintenance mode. Verification is the phase teams most often underestimate. Confirm the duration with a dry run on a copy of your network and agree the approval chain in writing before choosing a date.

What does the network team need to provide before the migration starts?

The network team needs to supply accurate inventory and access before any work begins. The main items are:

  • The Fabric version of every orderer and peer node, confirming they are at v1.4.2 or higher, which is the minimum for channel migration from Kafka to Raft.
  • A list of every channel, its consenters and its configuration update signers, plus the organization that administers each ordering node.
  • Access to ordering and peer hosts, TLS and MSP material, and the ability to take a ledger and MSP backup at the prescribed point.
  • A non-production copy of the network for rehearsal, and an agreed change window with every member organization.

Missing any of these usually turns the migration into a discovery exercise during the outage.

Can our internal team run the Kafka to Raft migration alone?

An internal team with Fabric operations experience can run the migration alone, provided it has the access, the signing authority from every organization and time to rehearse. The work is not a single command. It requires channel configuration update transactions, coordinated approvals across organizations, careful handling of backups and careful verification after restart. Teams that run the network every day usually have the knowledge. Teams that have not operated a Kafka ordering service or the channel participation process often benefit from a partner for planning, rehearsal and a second pair of hands during the window. Decide on that basis, and write down who owns each phase and each sign-off before the change window is booked.

What happens if the migration fails partway through?

Recovery depends on the backup. The migration is one way, so a failed attempt cannot simply be reversed by changing settings back. Kafka to Raft migration can recover from failure only if a backup was taken at the prescribed point, which is why the stop and back up phase is critical. Before the window, confirm who can restore the ledger and MSPs, how long a restore takes in your environment and who decides whether to roll forward or restore. Rehearse the restore on a copy of the network. Without a verified backup, a failed migration becomes an outage with no tested path back.

Why move to Raft instead of staying on Kafka?

Raft is the ordering service the Fabric documentation recommends for most networks. It is crash fault tolerant and keeps working while a majority of its nodes are available, so a five node Raft cluster tolerates the loss of two nodes. Staying on Kafka is not an option for a long-term upgrade path. Fabric v3.0 removed Kafka consensus, so Kafka networks must migrate to Raft before upgrading to v3.x. Fabric v2.5 remains the long-term support release for production users, and the v2.5 line continues to receive patch releases, so a network can plan the migration on its own timetable. For networks that need Byzantine fault tolerance, Fabric v3.0 added a SmartBFT ordering service, which is a separate decision from this migration.

Does the Kafka to Raft migration change how our applications connect?

Client applications are not usually rewritten for this migration, because the change is made at the ordering layer. The Fabric Gateway client API is compatible with both v2.5 and v3.0, so client applications can be upgraded separately from the network. Still, confirm that every application points at endpoints that remain valid after the ordering nodes restart, and test transaction submission and event delivery during verification. Any application still built on a legacy SDK is a separate migration and should be planned on its own track.

What should we do after Kafka to Raft and before the v3 upgrade?

After the migration, verify the Raft cluster, confirm that every channel reports Raft consensus, and monitor the ordering nodes through the operations service, which exposes /healthz health checks and a Prometheus /metrics endpoint. Then plan the v3 upgrade as its own project. The Fabric upgrade guide sets out four steps: back up the ledger and MSPs, upgrade orderer binaries in a rolling fashion, upgrade peer binaries in a rolling fashion and then update application channel capability levels. Fabric v3.0 also removed the v1.x legacy chaincode lifecycle, so confirm that every channel has moved to the v2.x lifecycle before starting. Treat each step as a separate, approved change.

How the five migration phases and the backup point fit together

The diagram starts with the network in normal Kafka operation and moves through maintenance mode, where the orderers are stopped and the ledger and MSPs are backed up. The backup point is the only safe recovery position, so it sits before any consensus change is written. Consensus type and metadata are then changed on each channel, the orderers restart on Raft, and the network is verified before leaving maintenance mode. The 3.x upgrade path starts only after every channel has moved, because v3.0 removed Kafka consensus.

Five migration phases, the backup point and the rollback boundary.

How DeployOpen scopes, rehearses and delivers the migration

DeployOpen treats the Kafka to Raft move as a fixed-scope, one-way change that covers every channel in one maintenance window. The work starts with an inventory of your channels, nodes and backups, then rehearses the five phases before anything changes in production.

How we scope

  • Inventory every channel, ordering node and peer version to confirm each node is at v1.4.2 or higher.
  • Agree in writing which channels, organizations and ordering nodes fall inside the maintenance window.
  • Define the backup point, restore test and rollback criteria the migration must meet before it starts.
  • Confirm the Raft node layout, TLS and MSP material each ordering node will use after the switch.

How we build

  • Rehearse the maintenance mode, stop, backup, consensus change and restart sequence on a non-production copy of the network.
  • Prepare the configuration update transactions for each channel and review them with your channel administrators.
  • Record how long each phase took in the rehearsal so the production window is planned from measured steps.
  • Check the operations service endpoints, health checks and logs on each orderer during the restart and verification phase.

How we hand over

  • Deliver a runbook with the exact order of steps, checks and owners for each phase of the window.
  • Document the backup location, restore procedure and the point after which rollback is no longer possible.
  • Provide a verification record per channel showing consensus type, ordering node status and transaction flow after the change.
  • Walk your operators through the runbook and the post-migration checks before you leave maintenance mode.

How we support

  • Keep the team available through the maintenance window to run checks and respond to failures during each phase.
  • Plan the next step toward the 3.x line, including the Fabric upgrade order for orderers, peers and capability levels.
  • Offer ongoing support, upgrades and continuous testing as a retainer after the migration is complete.

Sources and further reading

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.