Configuring Aeron to Send Messages to Randomly Selected Replicas of a Service in a Dynamic IP Environment

28 Views Asked by At

I'm working on a setup where we have one producer and a consumer, but the consumer may have multiple replicas deployed on different hosts, all sharing the same network. We need the producer to send a message to one of these replicas randomly each time it produces a message.

Currently, we're using Aeron for communication, and we have a challenge related to dynamic IP addresses. Our requirements are as follows:

The producer needs to know the IP of the consumer for the connection to be established. We can't have static IP addresses set as environment variables since they change with every deployment. We want to utilize an IP range to scan and discover available devices but still need to specify the endpoint IP of the consumer, which defeats the purpose of using the IP range. and also if the endpoint property requires an consumer IP what if we have multiple consumer replicas ? Here's an example of our Aeron channel configuration:

aeron:udp?endpoint=192.168.0.1:40456|interface=192.168.0.0/24

Is am I doing anything wrong here ? please correct me! advance thanks!

0

There are 0 best solutions below