puppies

Replication scenarios

Share this post on:

I recently put together a platform to demo a handful of scenarios related to YugabyteDB cross-cluster replication.

The code is here: https://github.com/dataindataout/xtest

This works for Mac (Apple M1) and should work on later versions of Mac and Linux. Unsure if it will work on Windows.

You will need a copy of YugabyteDB (2.16 or 2.17, depending on which branch of the demo code you use). Note that xcluster functionality improves greatly at 2.17, so test at that version or beyond if you can.

Set your path to include the YugabyteDB bin directory. Also, set 6 local IP addresses (127.0.0.1 through 127.0.0.6) using set_ips.sh.

Basic usage is: To start a test xcluster, run the shell script upx.sh. When you’re done experimenting, destroy the test cluster (including all files and processes) by running the shell script down.sh.

The node placement configuration is flexible, and allows you to use any names you’d like. In this case, we are making up a cloud (“gcp”) and region names; it doesn’t actually deploy to the cloud.

The following scenarios are available in the scenarios directory. The numbering is just for convenience — you can run these in any order and multiple times.

  • 1_running_traffic.sh (adds a million rows)
  • 2_add_index.sh
  • 3_add_column.sh
  • 4_drop_column.sh
  • 5_add_table.sh
  • 6_drop_table.sh
  • 7_change_datatype.sh

The open-source UI for YugabyteDB will be available at these local links, one for each cluster or side of cross-cluster replication.

http://127.0.0.1:7000

http://127.0.0.4:7000

When I finished, I realized I wanted something more extensible and with fewer manual steps, so I’ve started redoing this project in Ansible.

Author: Valerie Parham-Thompson

View all posts by Valerie Parham-Thompson >