Why do they have to be on different subnets? Couldn't you combine them into a single virtual network?
I'm looking at a scenario where my servers are in 3 different data centers, in which a docker cluster is setup between them.
I guess it should be possible to implement an alternative sync option. We have this interface:
So using MulticastBroadcastService.java as an example sendMessage, handleMessage and some others can be modified to synchronize with consul or redis cluster as Hashes data type.
I'm not sure about my assumptions the new Broadcast implementation can then be injected into MainModule
Not sure about Redis because you really want messaging solution, not a shared database. I think the simplest option is to implement a individual UDP sync instead of multicast. You also probably need some discovery algorithm, unless server list is predefined.
And my guess is that UDP sync will require the use of a port which will necessitate that a discovery mechanism be implemented, i'm thinking about a simple intermediary like a MQTT broker that each node/instance of the traccar service can subscribe and publish into.
I'm not very knowledgeable in network programming so that might be affecting my judgement of the complexity in implementing this, i'll appreciate any correction/education.
Yeah, I think MQTT might work.
Thanks anton, i'll experiment with in my free time.
Hi @tananaev apologies for reopening this i'm looking at testing this in a docker swarm across multiple servers, i did some basic research on the multicast broadcast it didn't look like it will work on servers on different subnet.
Any idea will be appreciated on this.