Yes, given you have low latency and the bandwidth to support it. Need to plan for cases when streaming does fall behind too; don’t want streaming to just break. Some options: 1. Replication slot on the upstream sever 2. Allow streaming to fallback to restoring WALs from archive 3. Both of the above options
That would help in managing you bandwidth between nodes. There is a lot to consider and it really depends on your use cases and your application/queries. A few rhetorical questions: What is the replicas being used for? What an acceptable replication lag? What an acceptable apply lag? Should queries be killed to apply replica transactions? What’s your vacuum strategy as that impacts replicas? These two parameters I find invaluable (their validity depends on your use case). hot_standby_feedback = true max_standby_streaming_delay = 30s The other big thing is query performance and I/O as each has a large impact on replication lag. So plan for tuning. |