Setting ownership strength at runtime for redundant services

1 post / 0 new
raz
Offline
Last seen: 3 months 3 days ago
Joined: 04/30/2019
Posts: 4
Setting ownership strength at runtime for redundant services

Hi everybody,

in my system I have two redundant instances of a service which can be activated or deactivated (paused) at runtime.

The OWNERSHIP policy is set to EXCLUSIVE and LIVELINESS to AUTOMATIC.

One instance is active while the other is inactive (some kind of hot standby). That means only the active instance is allowed to publish topics but both may read from their datareaders. If the primary instance is deactivated / paused by the user, its datawriters are still alive but not allowed to publish. After some time the other instance must leave standby and take over the primary role. Because of the OWNERSHIP policy it need to take over the ownership for its datawriter.

As far as I know this can be achieved by increasing the ownership strength at runtime for the new primary instance (if I don't increase the ownership strength, the corresponding datareader is not receiving the samples sent by the new primary instance). But this leads to the need of synchronizing the ownership strength between both service instances in order to repeat the primary take over.

Is there a better way of taking over the ownership? Some kind of datawriter reset?

Thanks in advance.