citusdata / citusdata/citus_docs

Request: Read Replica documentation

Open
#883 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
58
Forks
60
PR merge metrics
No merged PRs in 30d

Description

There is no current documentation showing how to set up read replicas in Citus Enterprise or Open Source, and this is a common enough request that it should probably have a page. High level overview of steps to take is as follows:

1. Set up read-replica workers and coordinator
2. Set up streaming replicas from all primary nodes to all read-replica nodes
3. On primary coordinator, add all read-replica workers as secondary nodes using this. Note the different cluster name- this is important.
http://docs.citusdata.com/en/v8.3/develop/api_udf.html#master-add-secondary-node

Example syntax:

SELECT master_add_secondary_node(
'follower-node-1.local', 5432,
'primary-1.local', 5432,
nodecluster => 'follower-cluster'
);

4. Make sure every primary worker and coordinator has an associated read replica worker added as a secondary!
5. On read replica coordinator, make following setting changes in postgresql.conf:
citus.use_secondary_nodes = 'always';
citus.cluster_name = 'follower-cluster';
Make sure that the read replica coordinator is restarted after changes are made

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.