Project

General

Profile

Feature #4193

Make ASF Strategy less sensitive to timeouts

Added by Junxiao Shi about 3 years ago. Updated 4 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
Forwarding
Target version:
Start date:
Due date:
% Done:

50%

Estimated time:
3.00 h

Description

Currently, AsfStrategy attempts to switches to an alternate path after one Interest times out.
It should be less sensitive, and switch to a new path after multiple timeouts.
The threshold should be configurable at runtime through strategy parameters (#3868).

#1

Updated by Junxiao Shi about 3 years ago

This problem is identified on 20170719 because ASF is not working well with NDN-RTC.
In NDN-RTC, each video frame is encoded as a variable number of data segments. The consumer may send more Interests than available segments, and the producer (incorrectly) does not use application-generated Nack but leaves the Interests to timeout.

20170719 NFD call discussed several ways to count timeouts:

  • An absolute number of consecutive timeouts.
  • A percentage of recent Interests (but it's unclear what does the percentage count against).
  • Multiple timeouts within a round-trip time can count as one timeout event.
  • The switching of paths should be gradual. For example, the Interest right after a timeout can be sent to two paths.
#2

Updated by Ashlesh Gawande over 2 years ago

  • Status changed from New to In Progress
#3

Updated by Junxiao Shi over 2 years ago

4480,15 gives the following strategy name syntax: /localhost/nfd/strategy/asf/%FD%02/probing-interval/30000/n-silent-timeouts/5.
There are two wasted components. It's better to use a more compact format: /localhost/nfd/strategy/asf/%FD%02/probing-interval%3D30000%20n-silent-timeouts%3D5.

#4

Updated by Junxiao Shi over 2 years ago

  • Target version changed from v0.6 to v0.7

4480,19 instructs the operator to configure the strategy with the following commands:

nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/
nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/%FD%02/probing-interval=30000
nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/%FD%02/n-silent-timeouts=5
nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/%FD%02/probing-interval=30000/n-silent-timeouts=5

All NDN names are invalid under NDN Packet Format v3.0 draft. The first one has / at the end. Others have = within a component but the portion before = is not a number.
Furthermore, although these names are somewhat human readable, it's not easy to remember.

I'd suggest a small bash or Python script to construct the strategy name, so that the above commands can be invoked like:

nfdc strategy set prefix /ndn strategy $(nfd-asf-strategy)
nfdc strategy set prefix /ndn strategy $(nfd-asf-strategy --probing-interval=30000)
nfdc strategy set prefix /ndn strategy $(nfd-asf-strategy --n-silent-timeouts=5)
nfdc strategy set prefix /ndn strategy $(nfd-asf-strategy --probing-interval=30000 --n-silent-timeouts=5)

Benefits of this approach include:

  • The nfd-asf-strategy script can check the command line arguments and ensure they are correct. If they are not, an error/usage message can be shown on stderr.
  • The script can accept both long form (as shown above) and short form (eg -p30000 -s5) flags, if desired.
  • Strategy parameters can use a more compact form, without worrying about human readability which shouldn't be a concern in the first place. Operator doesn't need to remember or type %FD%02 part as well.
#5

Updated by Davide Pesavento over 2 years ago

Junxiao Shi wrote:

I'd suggest a small bash or Python script to construct the strategy name, so that the above commands can be invoked like:

I very much disagree with this.

The script can accept both long form (as shown above) and short form (eg -p30000 -s5) flags, if desired.

The strategy itself can do the same. Or better, nfdc should natively include this functionality. But I don't see it as particularly urgent.

Strategy parameters can use a more compact form, without worrying about human readability which shouldn't be a concern in the first place

Why is compactness a concern while human readability isn't? I'd say the opposite is true.

In any case, it seems like this discussion will become mostly irrelevant once we have typed name components. So let's just implement something "good enough" for the time being.

#6

Updated by Junxiao Shi over 2 years ago

Why is compactness a concern while human readability isn't? I'd say the opposite is true.

In any case, it seems like this discussion will become mostly irrelevant once we have typed name components. So let's just implement something "good enough" for the time being.

Fine. ASF may define any syntax they want as long as URIs are valid.

#7

Updated by Junxiao Shi over 2 years ago

  • Blocked by Bug #4484: Component::toUri escapes ~ instead of + added
#8

Updated by Junxiao Shi over 2 years ago

Since you choose to use ~ as delimiter, this issue is now blocked by #4484. You may clear this block relation by using a different unaffected delimiter.

#9

Updated by Davide Pesavento over 2 years ago

Junxiao Shi wrote:

Since you choose to use ~ as delimiter, this issue is now blocked by #4484.

No it's not. Unreserved characters should not be encoded, but it's not illegal to do so, i.e. a fully encoded URI would still be valid. Therefore, decoding percent-encoded characters in the unreserved set can always be done and doesn't change the interpretation of the URI.

#10

Updated by Davide Pesavento over 2 years ago

  • Blocked by deleted (Bug #4484: Component::toUri escapes ~ instead of +)
#11

Updated by Davide Pesavento over 2 years ago

One change has been merged. What's left to do here?

#12

Updated by Ashlesh Gawande over 2 years ago

I think we would like to explore other suggestions in note-1 to make ASF less sensitive. Maybe it should be another issue?

#13

Updated by Davide Pesavento over 2 years ago

Ashlesh Gawande wrote:

I think we would like to explore other suggestions in note-1 to make ASF less sensitive. Maybe it should be another issue?

I was asking based on the issue description, which seems to have been fulfilled. I have no preference. If you intend to do more work under this issue, please update the description to clearly state what has been done and what hasn't.

#14

Updated by Ashlesh Gawande over 2 years ago

  • Subject changed from AsfStrategy: switch path after multiple timeouts to Make ASF Strategy less sensitive to timeouts

We have implemented "An absolute number of consecutive timeouts" for now so that ndnrtc's problem is solved and will investigate other suggested solutions.

#15

Updated by Davide Pesavento over 2 years ago

  • % Done changed from 0 to 40
#16

Updated by Ashlesh Gawande 9 months ago

  • Assignee changed from Ashlesh Gawande to Saurab Dulal
#17

Updated by Davide Pesavento 7 months ago

  • Target version changed from v0.7 to v0.8
#18

Updated by Davide Pesavento 4 months ago

  • % Done changed from 40 to 50

Also available in: Atom PDF