The Simplest Way to Make Cloudflare Workers and Zerto Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use cloudflare workers and zerto to run fast disaster recovery at the edge. Edge scripts check backup state and route user traffic during a site failure. When a main data center goes down, recovery speed matters a lot. Edge code can read backup alerts and switch user traffic to the backup site. This setup cuts down manual steps for your on-call team during an outage. How cloudflare workers and zerto share data and keys To link cloudflare workers and zerto, your edge script sends web re

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use cloudflare workers and zerto to run fast disaster recovery at the edge. Edge scripts check backup state and route user traffic during a site failure.

When a main data center goes down, recovery speed matters a lot. Edge code can read backup alerts and switch user traffic to the backup site. This setup cuts down manual steps for your on-call team during an outage.

How cloudflare workers and zerto share data and keys

To link cloudflare workers and zerto, your edge script sends web requests to the backup server. The backup platform exposes an API that reports site health and recovery status. Your edge script needs a valid key to log in and read this state.

First, the edge worker pulls a secret key from its secure store. Next, it sends that key to the backup server to get a session token. Once logged in, the script checks if a failover test or live recovery is active.

Data flows both ways in this setup. The backup tool can send a webhook alert to an edge URL when replication lags. Your edge script can also trigger a failover task when health checks fail. Both paths require strict network rules so random bots cannot reach the backup server.

Common risks with shared keys and broad network rules

Many teams make mistakes when they first link edge code to backup servers. The biggest risk is using a single admin account for all edge scripts. If that key leaks, an attacker can delete backup journals or stop replication.

Broad network access is another common failure mode in production setups. Because edge scripts run in many places, teams often open their firewall to all traffic. This exposes the backup management port to the public internet, which invites attacks.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged API calls also cause big problems during an audit or outage. When a shared script triggers a failover, logs only show the shared service name. You cannot tell which alert or team member started the recovery action.

How to scope roles and lock down the network path

You can fix these risks by splitting roles and tightening network paths. Start by making separate roles in your backup tool for reading and writing. Give health check scripts a read-only role so they can only view replication status.

If an edge script must trigger failovers, put it in a separate worker project. Give that specific worker a limited role that only runs recovery for one group. Never give an edge script full admin rights to change backup settings or delete data.

Next, lock down the network path between the edge and your data center. Use a private tunnel or mutual TLS certificates to check every incoming request. The firewall should drop any request that lacks your private client certificate.

Finally, rotate your API keys on a set schedule and log every action. Send both edge logs and backup server logs to one central log store. If your logs include user data, masking rewrites matched fields like emails or phone numbers in results. This gives your team a clear record of every health check and failover event.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Can an edge script trigger a live failover on its own?

Yes, an edge script can call the backup API to start a failover. Most teams only allow auto-failover for test runs and require human approval for live switches.

How should we store backup API keys at the edge?

Store all keys in the encrypted secret store provided by your edge platform. Never put keys or passwords in plain text inside your script files or code repos.

How do we let edge requests reach a private backup server?

Use an outbound private tunnel from your data center to the edge network. You can also require mutual TLS so your firewall blocks unknown web traffic.

The query runs. The emails stay hidden.