This document describes the chaos and resilience tests for Couchbase Lite Edge Server.
Test replication behavior while Sync Gateway connectivity is interrupted mid-workload.
- Configure the
traveldataset in Sync Gateway and Couchbase Server. - Update the Edge Server config to use the SGW replication URL as the source.
- Configure Edge Server with the
traveldatabase. - Wait for replication to become idle.
- Delete all documents in
travel.hotelson Edge Server using a bulk delete. - Verify
travel.hotelsis empty on both Edge Server and Sync Gateway. - Create 10,000 documents in
travel.hotelsvia bulk create on Edge Server. - Wait for replication to become idle and verify counts match on Edge Server and SGW.
- Update all documents and apply firewall deny rules to block SGW.
- Perform another update while SGW is blocked, then allow SGW and wait for idle.
- Verify document counts match and reset Edge Server firewall rules.
Test multi-edge synchronization and recovery with chained replications.
- Configure Edge Server 1 with the
traveldataset. - Configure Edge Server 2 to replicate from Edge Server 1.
- Configure Edge Server 3 to replicate from Edge Server 2.
- Reconfigure Edge Server 1 to replicate from Edge Server 3 (loop).
- Delete all documents in
travel.hotelson Edge Server 1. - Verify
travel.hotelsis empty on Edge Servers 1, 2, and 3. - Create 1,000 documents in
travel.hotelson Edge Server 1 and wait for idle. - Verify document counts match across Edge Servers 1, 2, and 3.
- Kill Edge Server 1, update documents via Edge Servers 2/3, and verify replication.
- Kill Edge Servers 1 and 3, update documents via Edge Server 2, and verify replication.
Test the offline synchronization and recovery capabilities of a chained Edge Server topology.
- Configure Edge Server 1 to replicate from Sync Gateway for the
traveldataset. - Configure Edge Server 2 to replicate from Edge Server 1.
- Configure Edge Server 3 to replicate from Edge Server 2.
- Wait for replication to become idle across all Edge Servers.
- Delete all documents in the
travel.hotelscollection on Edge Server 3 using a bulk delete. - Wait for replication to become idle, then kill Edge Server 3.
- Verify the documents are deleted in Edge Server 1, Edge Server 2, and Sync Gateway.
- Restart Edge Server 3 and wait for it to come online.
- Create 10,000 documents in
travel.hotelsvia bulk create on Edge Server 3. - Verify documents are created on Edge Server 3 and wait for replication to become idle.
- Kill Edge Server 3 again.
- Verify the created documents propagated successfully to Edge Server 2, Edge Server 1, and Sync Gateway.
Test the stability and consistency of Edge Server under a randomized concurrent REST CRUD workload.
- Configure Edge Server with a database named
db. - Seed the database with 10,000 documents using bulk create operations.
- Verify the initial document load is successful and document counts match.
- Run a randomized CRUD workload for 1,000 iterations containing a mix of create, update, delete, and read operations.
- Perform final data consistency validation by verifying the documents on Edge Server match the expected state tracked locally.