Feature #3662
closedNotificationSubscriber: Nack
0%
Description
Handle Nack in NotificationSubscriber
.
Updated by Junxiao Shi over 8 years ago
- Blocks Task #3334: Deprecate Face::expressInterest non-Nack overloads added
Updated by Junxiao Shi over 8 years ago
- Related to Feature #3663: NotificationSubscriber: Validator added
Updated by Junxiao Shi over 8 years ago
- Assignee set to Teng Liang
Teng agrees to work on this issue within a week.
Updated by Teng Liang over 8 years ago
There is no description of handling NACK in the notification wiki. As a NACK can be generated by multiple reasons, it is proper to treat it as the same as a timeout; a subscriber will restart with the initial request after receiving a NACK.
Updated by Teng Liang over 8 years ago
- Status changed from In Progress to Code review
Updated by Junxiao Shi over 8 years ago
Reply to note-4:
It might be harmful to immediately restart the subscriber with an initial Interest, especially when the Nack was returned against an initial Interests.
Consider the case a subscriber is fetching a notification stream that is unroutable.
The router would immediately return a Nack-NoRoute.
If the subscriber immediately resends the Interest, the router would return the Nack again, and so on, leading to high bandwidth usage.
Similarly, in case of a Nack-Congestion, immediately resending the Interest can only worsen the congestion.
For both Nack-NoRoute and Nack-Congestion, a reasonable reaction is to wait for a random delay before resending the initial Interest.
The delay duration can be randomized between 5% and 20% of InterestLifetime.
I cannot think about the best reactions for other Nack reasons and reasonless Nacks, but the same reaction should work as well.
Updated by Junxiao Shi over 8 years ago
20160719 call decides that it's necessary to have a delay after Nack before resending the initial Interest.
The delay should use an exponential back-off policy, plus a small randomization to avoid synchronization.
Updated by Teng Liang over 8 years ago
Junxiao Shi wrote:
20160719 call decides that it's necessary to have a delay after Nack before resending the initial Interest.
The delay should use an exponential back-off policy, plus a small randomization to avoid synchronization.
Here is the rough description of the implementation design:
The method exponentialBackoff() is added to calculate the delay time after receiving a Nack. The variable lastNackSeq is used to check if the same Interest is Nacked again;
if true, attempts += 1
; otherwise, attempts = 1
; the delayTime is then calculated and returned.
delayTime = pow(2, attempts) * 100 ms + a random value in [1ms, 100ms]
Updated by Junxiao Shi over 8 years ago
- Status changed from Code review to Closed