Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 1.78 KB

File metadata and controls

61 lines (43 loc) · 1.78 KB

RDS Failover Test

Key Value
Services RDS
Integrations AWS CLI
Categories Database; Resilience

Introduction

A demo application illustrating RDS global cluster failover testing with LocalStack. The sample creates a global RDS cluster with primary and secondary clusters, then triggers a failover to verify that the cluster writer is updated correctly.

Prerequisites

Check prerequisites

make check

Installation

make install

Start LocalStack

export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
make start

Run the application

make run

The script creates a global RDS cluster with primary and secondary instances, triggers a failover, and verifies the cluster writer has been updated.

You should see output similar to:

Creating global cluster 'global-cluster-1'
Creating primary DB cluster 'rds-cluster-1'
Creating secondary DB cluster 'rds-cluster-2'
Running assertions, to ensure the cluster writer has been updated
Start global DB cluster failover ...
✅ Test done - all assertions succeeded

License

This code is available under the Apache 2.0 license.