Stateful IGMP fastleave
Methods, systems, and computer readable media described herein can be operable to facilitate an IGMP fastleave using a listener reference count. A gateway proxy saves each listener for every specific multicast group, thus the gateway knows if a listener is the last one in the group when it receives a leave report from a listener. The gateway leaves the group immediately without sending specific query if the leave report comes from the last listener of the current group, thereby significantly reducing the leave latency. Otherwise, the standard procedure wins, and the gateway sends out a specific query when the leave report is not from the last listener.
1. A method by a gateway device comprising:
receiving from one or more client devices one or more responses to a general query during a startup procedure, wherein the one or more responses identify the one or more client devices and one or more multicast groups to which the one or more client device are joined;
establishing a listener reference count for each multicast group of the one or more multicast groups, wherein the listener reference count is established based on the one or more responses, wherein the listener reference count reflects a value of the one or more client devices that are currently joined to each multicast group;
receiving a leave request from a client device of the one or more client devices;
identifying from the leave request, a multicast group of the one or more multicast groups associated with the leave request;
decreasing the value of the listener reference count that is associated with the identified multicast group;
determining the value of the listener reference count;
reporting a leave for the identified multicast group to a headend device without sending a specific query to the one or more client devices on a local network associated with the gateway device based on the value.
2. The method of claim 1 , wherein the value of the listener reference count is maintained by an IGMP (Internet group management protocol) proxy at the gateway device.
3. The method of claim 2 , wherein the value of the listener reference count is maintained by increasing the value of the listener reference count by a value of one (1) each time a join request associated with the multicast group is received by the gateway device.
4. The method of claim 3 , wherein the value of the listener reference count is increased after determining that the client device is not already saved as a listener of the identified multicast group.
5. The method of claim 1 , wherein the value of the listener reference count is set before the leave request is received, based upon one or more responses to a general query output from the gateway device, the one or more responses being received by one or more of the client devices on the local network.
6. The method of claim 1 , further comprising:
removing the client device from a group of listeners of the identified multicast group.
7. The method of claim 1 , wherein the value of the listener reference count is decreased after determining that the client device is saved as a listener of the identified multicast group.
8. A gateway device comprising:
a computer-readable medium storing one or more instructions;
a processor that executes one or more instructions that cause the gateway device to:
receive from one or more client devices one or more responses to a general query during a startup procedure, wherein the one or more response identify the one or more client devices and one or more multicast groups to which the one or more client devices are joined;
establish a listener reference count for each multicast group of the one or more multicast groups, wherein the listener reference count is established based on the one or more responses, wherein the listener reference count reflects a value of the one or more client devices that are currently joined to each multicast group;
receive a leave request from a client device of the one or more client devices;
identify from the leave request, a multicast group of the one or more multicast groups associated with the leave request;
decrease the value of the listener reference count that is associated with the identified multicast group;
determine the value of the listener reference count has reached zero;
report a leave for the identified multicast group to a headend device without sending a specific query to the one or more client devices on a local network associated with the gateway device based on the value.
9. The gateway device of claim 8 , wherein the value of the listener reference count is maintained by an IGMP (Internet group management protocol) proxy at the gateway device.
10. The gateway device of claim 9 , wherein the value of the listener reference count is maintained by increasing the value of the listener reference count by a value of one (1) each time a join request associated with the multicast group is received by the gateway device.
11. The gateway device of claim 10 , wherein the value of the listener reference count is increased after determining that the client device is not already saved as a listener of the identified multicast group.
12. The gateway device of claim 8 , wherein the value of the listener reference count is set before the leave request is received, based upon one or more responses to a general query output from the gateway device, the one or more responses being received by one or more of the client devices on the local network.
13. The gateway device of claim 8 , wherein the gateway device removes the client device from a group of listeners of the identified multicast group.
14. One or more non-transitory computer readable media of a gateway device having instructions operable to cause one or more processors to perform the operations comprising:
receiving from one or more client devices one or more responses to a general query during a startup procedure, wherein the one or more responses identify the one or more client devices and one or more multicast groups to which the one or more client device are joined;
establishing b a listener reference count for each multicast group of the one or more multicast groups, wherein the listener reference count is established based on the one or more responses, wherein the listener reference count reflects a value of the one or more client devices that are currently joined to each multicast group;
receiving the one or more responses to the general query, wherein the one or more response identify the one or more client devices and one or more multicast groups to which the one or more client device are joined;
identifying from the leave request, a multicast group of the one or more multicast groups associated with the leave request;
decreasing the value of the listener reference count that is associated with the identified multicast group;
determining the value of the listener reference count;
reporting a leave for the identified multicast group to a headend device without sending a specific query to the one or more client devices on a local network associated with the gateway device based on the value.
15. The one or more non-transitory computer-readable media of claim 14 , wherein the value of the listener reference count is maintained by an IGMP (Internet group management protocol) proxy at the gateway device.
16. The one or more non-transitory computer-readable media of claim 15 , wherein the value of the listener reference count is maintained by increasing the value of the listener reference count by a value of one (1) each time a join request associated with the multicast group is received by the gateway device.
17. The one or more non-transitory computer-readable media of claim 16 , wherein the value of the listener reference count is increased after determining that the client device is not already saved as a listener of the identified multicast group.
18. The one or more non-transitory computer-readable media of claim 14 , wherein the value of the listener reference count is set before the leave request is received, based upon one or more responses to a general query output from the gateway device, the one or more responses being received by one or more of the client devices on the local network.
19. The one or more non-transitory computer-readable media of claim 14 , wherein the instructions are further operable to cause one or more processors to perform the operations comprising:
removing the client device from a group of listeners of the identified multicast group.
20. The one or more non-transitory computer-readable media of claim 14 , wherein the value of the listener reference count is decreased after determining that the client device is saved as a listener of the identified multicast group.