Skip to content
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

Publisher needs to terminate lagging subscriptions #3

Open
magnusfeuer opened this issue Feb 1, 2019 · 0 comments
Open

Publisher needs to terminate lagging subscriptions #3

magnusfeuer opened this issue Feb 1, 2019 · 0 comments

Comments

@magnusfeuer
Copy link
Member

A publisher tracks packet acknowledgement for each subscriber through rmc_pub_context:subscribers[].inflight and
If a subscriber fails to acknowledge an inflight packet sent out via multicast within RMC_DEFAULT_PACKET_TIMEOUT microseconds, the packet will be resent by the publisher via the dedicated tcp control channel to the lagging subscriber.
However, the tcp resend can also be stalled due to the subscriber failing to read it in a timely manner, leading to full queues and resource hogging.

In these cases the publisher must terminate the tcp connection to the subscriber, effectively ending the subscription, to free up the resources.

The metric to see if a subscriber should be terminated is the delta between the oldest packet (lower packed id) in the subscriber's inflight list with the oldest packet in all other subscriber's inflight list.

The greatest delta found tells us how far ahead (in packets) the fastest subscriber is in comparison with the slowest. At some TBD distance threshold the subscription shall be terminated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant