EOXLABS migrates existing systems to the edge without a big-bang rewrite. A Worker goes in front of the current application, routes move to the edge one at a time, the existing database stays where it is and is reached through Hyperdrive, and every step ships with a rollback that has been tested before it is needed.
This work is part of the Maintain On Course engagement, for existing projects that need to be reimplemented, maintained or optimized.
Why not rewrite the system from scratch?
A rewrite promises a clean start and delivers a cutover day on which every risk lands at once, while the old system keeps changing underneath the new one. EOXLABS compares four approaches with the client before choosing one.
| Approach | What happens | Main risk | When EOXLABS recommends it |
|---|---|---|---|
| Big-bang rewrite | A new system is built beside the old one and switched on in one cutover | All risk lands on one day, and the target moves while the new system is built | Rarely: small systems with few integrations |
| Lift and shift | The same code moves to new hosting | Every existing problem moves with it | When the goal is leaving a data center, not changing the system |
| Edge layer only | Workers sit in front for routing, caching and authentication | Limited gain: every dynamic request still reaches the origin | As the first step of a migration, or when the origin is healthy |
| Strangler fig | The system is replaced route by route behind the same front door | Two systems run side by side for a while, and the seams need discipline | The default for live systems that can't stop |
Martin Fowler, who named the pattern, describes the strangler fig as "a gradual approach to legacy modernization". A strangler fig migration trades a longer period of running two systems for the ability to stop, measure and reverse at every step.
How does EOXLABS run a strangler fig migration, step by step?
- Audit. EOXLABS inventories the routes, their traffic, the data each one reads and writes, the integrations, and the parts that fail most. The audit decides the order of the migration.
- Put the edge in front. A Worker attaches to the application's hostname through a route. Cloudflare's documentation describes routes acting as a proxy, and calling fetch() on the incoming request sending a subrequest to the application server. On day one, every route passes through unchanged.
- Reach the existing database. Hyperdrive gives Workers pooled connections and query caching for any Postgres or MySQL database. When the database sits on a private network, Hyperdrive connects through Cloudflare Tunnel and Cloudflare Access. Workers that mostly talk to that database can be placed near its cloud region instead of near the user.
- Move one route. The first route has clear boundaries and good test coverage. It is re-implemented in Workers and, for a read route, run in shadow: both versions answer, the responses are compared, and only the origin's answer is returned until they match. A write route is tested against a database branch before it takes live traffic.
- Shift traffic gradually. Gradual deployments split traffic between Worker versions by percentage, and version affinity can keep requests with the same key on one version while the split is in place.
- Move the data last. Once every route that writes a table has moved, the table can move. Neon can act as a logical replication subscriber for live migrations from external Postgres sources such as AWS RDS and Google Cloud SQL, and Hyperdrive is then pointed at the new database.
- Retire the old path. Dead code comes out of the origin as each route moves. When the last route moves, the origin can be shut down, or kept for the few parts that belong there.
What can't a rollback undo?
A rollback of a Worker is fast, but it is narrower than many teams assume. Cloudflare's rollback documentation states that a rollback creates a new deployment sending 100% of traffic to the selected version, that only the 100 most recent versions are available, and that versions older than 30 days may be deleted. It also states that resources connected to the Worker are not changed by a rollback, that a rollback is blocked if a Durable Object class lifecycle change happened between the two versions, and that errors can occur if the structure of the data has changed.
EOXLABS designs around those limits:
- Code and data change separately. Schema changes follow an expand-and-contract sequence: add the new column, write to both, backfill, switch reads, then remove the old one. Every code version inside the rollback window can still read the data.
- Durable Object class changes get their own release. They never ride along with a risky code change, because they block the rollback of that change.
- Migrations are rehearsed on a copy. Each schema migration runs first on a Neon branch, a copy-on-write clone of the database, with a timed rollback.
When is a system ready to move to the edge?
- Users far from the hosting region wait on every request.
- Releases are rare because each one is risky, and nobody wants to touch the oldest code.
- The hosting contract, hardware or framework version is reaching end of life.
- The origin is exposed to the internet and patched irregularly.
- One or two people understand the system, and they would like to work on something else.
What does the client receive?
- An audit report: routes, traffic, data ownership, integrations and risks, with a recommended approach from the table above.
- A migration map that orders the routes and states the exit criteria for each.
- A cutover and rollback runbook for every route.
- A data migration plan, including the replication setup and the verification queries.
- A decommissioning plan for the origin, or a written reason for keeping part of it.
When isn't a migration to the edge the right fit?
- The system is stable, rarely changes, and its users sit near it. An edge layer for caching and authentication may be all it needs, or nothing at all.
- The core depends on software the Workers runtime can't run. A mainframe transaction monitor or a Windows-only library stays on its origin. A partial migration, with the edge in front and that core behind it, is a legitimate end state.
- The organization plans to replace the system with an off-the-shelf product. Migrating code that will be retired soon is wasted effort.
What else does a migration involve?
The target design comes from edge architecture, and moving records between systems is data pipeline work with validation and lineage. Closing an exposed origin is often the first gain in security and resilience. The capabilities overview shows how these fit in one engagement.
The engineering note on migrating a monolith to the edge walks through a migration in detail, and edge-native versus edge-deployed systems explains where a migration should end up. The stack pages on Hyperdrive, Postgres on Neon and Cloudflare Workers describe the tools.
Long-lived systems are common in financial services, dental technology and critical infrastructure; those pages describe what migration has to respect in each.