How do i create a failover dr, where my application is using mysql db
valuemoretec
PROOP

2 months ago

I have an application hosted on Railway that uses MySQL as its primary database.

I want to build a multi-region disaster recovery (DR) / failover setup with the following architecture:

Region 1 (Primary): Application + MySQL Primary

Region 2 (Standby): Application + MySQL Replica

MySQL data should continuously replicate from the primary region to the standby region.

Under normal conditions, all application writes should go to the primary region.

If the primary region/database fails, I want to promote the standby MySQL database to primary and route application traffic to the standby region.

When the primary region recovers, I want to rebuild it as a replica and perform a controlled failback.

Solved$20 Bounty

Pinned Solution

MySQL HA is now in beta. I wouldn't recommend using this for production though, since it's still in the beta phase.

To use this, you'll need to enable Priority Boarding at https://railway.com/account/feature-flags. You'll then be able to convert your singular MySQL instance to a HA instance from the Database > Config tab.

2 Replies

Railway
BOT

2 months ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 2 months ago


Railway doesn't natively support fallover, you'd need to create something on your own that does that.

You can, however, set up replicas on Railway.


MySQL HA is now in beta. I wouldn't recommend using this for production though, since it's still in the beta phase.

To use this, you'll need to enable Priority Boarding at https://railway.com/account/feature-flags. You'll then be able to convert your singular MySQL instance to a HA instance from the Database > Config tab.


Status changed to Solved 0x5b62656e5d • 27 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...