Deploying PeerDB
We currently support deploying and testing PeerDB using our Docker Compose file.Docker can be installed by referring to these instructions.
The
docker compose
tool should also be present. The Postgres client tools (specifically
psql
) are used to test the PeerDB installation.Quickstart
The following steps assume you have PeerDB running locally. We also need
psql
installed and available on your
PATH.Setup
This script reuses the PeerDB internal Postgres instance to setup two databases, which we can use to create two peers. It also creates some tables on both databases to use later in the quickstart. Run the following commands in your terminal:Creating Peers
With PeerDB running, we can create our first peers. Head over tolocalhost:3000
on your browser. This is the PeerDB Dashboard.
Clicking on Peers in the sidebar will take us to the Peers page.
Creating Source Postgres Peer
Let’s click on the Create Peer button at the top right to get started.

postgres
.

Creating Target Kafka Peer
Let’s create the target Kafka peer. First lets start a local Kafka (or Redpanda) instance.
- Name:
target
- Servers:
redpanda-0:9092
- SASL Mechanism:
Scram SHA 256
- Partitioner:
Least Backup
- Disable TLS:
true

Real-time CDC
Lets start by creating a CDC mirror. In the side-bar click on Mirrors, and then CDC Mirror.

public.test
.
Now that we’ve filled in all the mirror details.
Let’s click on Create Mirror, which will validate to check if everything is set up correctly, much like we did when creating peers and then will create the mirror.

Mirrors
page which we landed on after creating the mirror:


public.test
topic:

INSERT
, UPDATE
, DELETE
) from source to target.
FAQ
If you have any questions about the PeerDB setup and deployment process, don’t hesitate to reach out on Slack. We’re more than happy to assist and answer any questions, including:- What is the performance I can expect during CDC and query based replication?
- How do I know my data sync is successful?
- Can I set a specific time to start my data sync?