-
-
Notifications
You must be signed in to change notification settings - Fork 1
PostgreSQL Logical Replication Load-Balancing Example #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a comprehensive example demonstrating PostgreSQL logical replication with load-balancing capabilities using Docker containers and a microservice-based ESB (Enterprise Service Bus) orchestrator.
Changes:
- Adds Docker-based multi-master logical replication setup with configurable network topology
- Implements JSON-RPC server infrastructure for managing database nodes
- Provides orchestration scripts for automated container deployment and configuration
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| example/01-logical-replication/sysconfig.json | System configuration defining network topology, roles, and scaling parameters |
| example/01-logical-replication/svc_call_metadata.py | Service call metadata definitions for network topology updates and database initialization |
| example/01-logical-replication/orchestrator.py | Main orchestration script that creates Docker containers and initializes the database cluster |
| example/01-logical-replication/run-container.sh | Shell script for launching individual database node containers |
| example/01-logical-replication/docker-network.sh | Script to create Docker network with custom subnet configuration |
| example/01-logical-replication/docker-build.sh | Script to build the database node Docker image |
| example/01-logical-replication/docker-daemon/daemon.json | Docker daemon configuration disabling iptables |
| example/01-logical-replication/db-node.dockerfile | Dockerfile defining the PostgreSQL database node with JSON-RPC server |
| example/01-logical-replication/db-node-rpc/start-server.sh | Script to start the JSON-RPC server in containers |
| example/01-logical-replication/db-node-rpc/service_properties.py | Service property definitions for ESB validation |
| example/01-logical-replication/db-node-rpc/service_implementation.py | ESB service handler implementations for database and network operations |
| example/01-logical-replication/db-node-rpc/json-rpc-server.py | JSON-RPC server implementation for handling remote procedure calls |
| example/01-logical-replication/db-node-rpc/esbconfig.py | ESB configuration for importing service classes |
| example/01-logical-replication/db-node-rpc/class_reference.py | Class hierarchy definitions for service routing |
| example/01-logical-replication/db-node-rpc/class_mapping.py | Mapping definitions between service names and implementation classes |
|
|
||
| network = sysconfig['system']['networks'][0] | ||
|
|
||
| network_id = network['id'] |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'network_id' is assigned on this line but never used in the code. Consider removing it if it's not needed, or use it where intended.
Pull Request
Description
Add an example which demonstrates a) load balancing and b) write balancing. The example is using multiple docker container and a simple ESB driven orchestrator to setup a PostgreSQL multi-master logical replication environment.
Type of Change