Multiple SymmetricDS instances at same host

684 views Asked by At

I'm looking at running multiple SymmetricDS instances to do replication between different environments independently, e.g. Oracle Test -> Postgres Test, Oracle Dev -> Postgres Dev. The instances will run in Docker containers in a Mesos cluster, possibly at the same host. I see that SymmetricDS store the sync.url in the SYM_NODE table. Since I've up to now only have had one SymmetricDS instance, the port is hard coded in the engine/*.properties files:

# master-000.properties
sync.url=http://$(ipAddress):31415/sync/master-000
# slave-001.properties
registration.url=http://$(ipAddress):31415/sync/master-000

Could this potentially cause problems, since the sync.url will be identical for both instances?

2

There are 2 answers

0
hanshenrik On

If you don't need to reach the SymmetricDS process from outside the Docker container, both instances can use the same port(s). Just make sure to run the Docker container in Bridge mode (not Host), and don't expose any ports.

1
chenson42 On

You can run multiple SymmetricDS nodes in the same instance. It is called multi-homing. All you do is simply add multiple .properties files under the engines directory. You distinguish between the two nodes using different engine.name parameters which show up in the sync.url.

The sync.url is:

http://{symmetricds installation host name or dns name}:{symmetricds port configured in symmmetric-server.properties}/sync/{engine.name}