Cloud

Configure Failover

Failover is the process of modifying shadow topics or an entire shadow cluster from read-only replicas to fully writable resources, and ceasing replication from the source cluster. You can fail over individual topics for selective workload migration or fail over the entire cluster for comprehensive disaster recovery. This critical operation transforms your shadow resources into operational production assets, allowing you to redirect application traffic when the source cluster becomes unavailable.

You can failover a shadow link using the Redpanda Cloud UI, rpk, or the Data Plane API.

See Failover Runbook for immediate step-by-step disaster procedures.

Shadowing is supported on BYOC and Dedicated clusters running Redpanda version 25.3 and later.

Plan for failover

Before running a failover, be sure you understand the following considerations, which affect your disaster recovery strategy and operational planning.

Data consistency:

  • Some data loss may occur due to replication lag at the time of failover.

  • Consumer group offsets are preserved, allowing applications to resume from their last committed position.

  • In-flight transactions at the source cluster are not replicated and will be lost.

Recovery-point-objective (RPO):

The amount of potential data loss depends on replication lag when disaster occurs. Monitor lag metrics to understand your effective RPO.

Testing requirements:

Regularly test failover procedures in non-production environments to validate your disaster recovery processes and measure your recovery time objective (RTO).

Choose a failover scope

What a failover does depends on its scope. In every scope, each topic that fails over stops fetching data from the source cluster and changes state from ACTIVE to FAILING_OVER, then to FAILED_OVER.

Topic failover is irreversible. Once failed over, topics cannot return to shadow mode, and automatic fallback to the original source cluster is not supported.

To avoid a split-brain scenario after failover, ensure that all clients are reconfigured to point to the shadow cluster before resuming write activity.
Scope Use it when Shadow link after failover Sync tasks after failover Schema Registry after failover

All topics

The source cluster is down, and the shadow cluster becomes your production cluster.

ACTIVE

Still running

Still write-protected

One topic (--topic)

You want to move specific workloads, or test your failover procedures.

ACTIVE

Still running

Still write-protected

Fail over all topics

Use this approach when the source cluster becomes unavailable and you need to make the entire shadow cluster your new production environment. For example, a cloud region outage takes down every source broker, or the source cluster’s datacenter loses power or network connectivity.

To fail over every active shadow topic in the shadow link, use one of the following methods.

In Redpanda Cloud, always run rpk shadow failover with --all or --topic. Without a scope flag, rpk 26.3 and later fails over the shadow link itself, which Redpanda Cloud does not support.
  • Cloud UI

  • rpk

  • Data Plane API

  1. On the Shadow Link page, select your shadow link.

  2. Click Failover All Topics.

  3. Click to confirm the failover action. The failover process promotes all topics to writable status.

rpk shadow failover <shadow-link-name> --all

The shadow link stays ACTIVE, and its metadata sync tasks keep running.

Send a POST /v1/shadow-links/{name}/failover request to the Data Plane API. If you do not specify a shadow topic in the request body, this command requests a failover of all shadow topics associated with the shadow link:

curl -X POST "$DATAPLANE_API_URL/v1/shadow-links/<shadow-link-name>/failover" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${RP_CLOUD_TOKEN}"

Fail over one topic

Use this approach when you need to selectively failover specific workloads or when testing failover procedures.

To fail over a specific shadow topic while leaving other topics in the shadow link still replicating, run:

  • Cloud UI

  • rpk

  • Data Plane API

  1. On the Shadow Link page, select your shadow link.

  2. For any of the topics you want to failover, click the corresponding Failover button.

  3. Click to confirm the failover action. The failover process promotes the selected topics to writable status.

rpk shadow failover <shadow-link-name> --topic <topic-name>

For detailed command options, see rpk shadow failover.

Send a POST /v1/shadow-links/{name}/failover request to the Data Plane API. Specify the name of the shadow topic in the request body:

curl -X POST "$DATAPLANE_API_URL/v1/shadow-links/<shadow-link-name>/failover" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${RP_CLOUD_TOKEN}" \
  -d '{
    "shadowTopicName": "<shadow-topic-name>"
  }'

Force delete is the last resort when topics are stuck in transitional states and you need immediate access to all replicated data.

  • Cloud UI

  • rpk

  • Control Plane API

All failover actions in the Cloud UI include force delete functionality by default. When you failover a shadow link, all topics are immediately promoted to writable status.

rpk shadow delete force deletes the shadow link by default in Redpanda Cloud:

rpk shadow delete <shadow-link-name>

Use the Control Plane API to force delete a shadow link:

curl -X DELETE 'https://api.redpanda.com/v1/shadow-links/<shadow-link-id>' \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${RP_CLOUD_TOKEN}"

Force deleting a shadow link is irreversible and immediately fails over all topics in the link, bypassing the normal failover state transitions. This action should only be used as a last resort when topics are stuck in transitional states and you need immediate access to all replicated data.

Monitor failover progress

Track failover progress with any of these methods:

  • Cloud UI

  • rpk

  • Data Plane API

Track the progress of failover operations from the Shadow Link page in the Cloud UI.

To check the progress of a topic failover, show the overview and topic sections of the shadow link status:

rpk shadow status <shadow-link-name> --print-overview --print-topic

For example, during a failover of every active topic, after orders has failed over but while payments is still failing over:

OVERVIEW
========
NAME    <shadow-link-name>
UID     <uid>
STATE   ACTIVE
TOPICS  2 total, 1 FAILING_OVER, 1 FAILED_OVER

TOPICS
======
Name: orders, ID: <topic-id>, State: FAILED_OVER
      PARTITION  SRC-LSO  SRC-HWM  DST-HWM  LAG
      0          1500     1500     1500     0
      1          1480     1480     1480     0

Name: payments, ID: <topic-id>, State: FAILING_OVER
      PARTITION  SRC-LSO  SRC-HWM  DST-HWM  LAG
      0          820      820      810      10

The TOPICS row in the overview counts the topics in each state. In the topic section, each topic shows its state and one row for each partition. LAG is the source high watermark (SRC-HWM) minus the shadow topic’s high watermark (DST-HWM). Without the print flags, the command prints every section, including the sync tasks and the Schema Registry sync status. For detailed command options, see rpk shadow status.

curl "$DATAPLANE_API_URL/v1/shadow-links/<shadow-link-name>" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${RP_CLOUD_TOKEN}"

Failover states

A failover of topics leaves the shadow link ACTIVE, and its sync tasks keep running.

Shadow topic states

Individual shadow topics report one of the following states:

  • ACTIVE: Normal replication state before failover.

  • PAUSED: Replication temporarily halted by user action.

  • FAILING_OVER: Failover initiated, replication stopping.

  • FAILED_OVER: Failover completed successfully. The topic is fully writable.

  • FAULTED: The source topic can no longer be mirrored, typically because it was deleted and recreated with the same name, or its partition count dropped.

  • PROMOTING: The topic is being promoted to a regular topic.

  • PROMOTED: The topic was promoted to a regular topic.

FAILED_OVER, FAULTED, and PROMOTED are final states. A failover leaves topics that are already in one of these states unchanged.

Sync task states

Shadow link sync tasks report one of the following states:

  • ACTIVE: Task is operating normally and replicating data

  • FAULTED: Task encountered an error and requires attention

  • NOT_RUNNING: Task is not currently executing

  • LINK_UNAVAILABLE: Task cannot communicate with the source cluster

For detailed information about shadow link tasks and their roles, see Shadow link tasks.

After failover

After successful failover, your shadow cluster exhibits the following characteristics:

Topic accessibility:

  • Failed over topics become fully writable and readable.

  • Applications can produce and consume messages normally.

  • All Kafka APIs are available for failedover topics.

  • Original offsets and timestamps are preserved.

Shadow link status:

  • The shadow link stays ACTIVE and its sync tasks keep running. The failed-over topics show the FAILED_OVER state.

  • Deleting the shadow link after the failover completes is the intended cleanup. It removes only the link record, never topics or data, and frees the slot for a new shadow link.

Operational limitations:

  • No automatic fallback mechanism to the original source cluster.

  • Data transforms remain disabled until you manually re-enable them.

  • Audit log history from the source cluster is not available (new audit logs begin immediately).

Network partitions:

If the source cluster becomes accessible again after failover, do not attempt to write to both clusters simultaneously. This creates a scenario with potential data inconsistencies, since metadata starts to diverge.

Next steps

After completing failover:

  • Update your application connection strings to point to the shadow cluster

  • Verify that applications can produce and consume messages normally

  • Delete the shadow link after the failover is complete and permanent. This frees the slot for a new shadow link.

For emergency situations, see Failover Runbook.