Project

General

Profile

Actions

Bug #1455

closed

nfdc prematurely timeouts on failed TCP face creation

Added by Alex Afanasyev about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Target version:
-
Start date:
04/09/2014
Due date:
% Done:

0%

Estimated time:
1.00 h

Description

This is a joint problem of nfdc, nfd/nrd::Controller, and FaceManager.

The "problem" occurs when someone tries to create TCP face to some random address. FaceManager uses 4 seconds timeout (4 seconds for DNS resolution or 4 seconds for connect operation). nfd(nrd)::Controller used by nfdc(nrdc) use default Interest lifetime of 4 seconds to get the response.

As a result of these, the actual negative response from FaceManager is never received by nfdc(nrdc) and the only thing nfdc(nrdc) knows is that command interest timed out.


Related issues 1 (0 open1 closed)

Related to ndn-cxx - Task #1508: Enable timeout customization for nfd/nrd::Controller operationsClosed04/20/2014

Actions
Actions #1

Updated by Alex Afanasyev about 10 years ago

I'm not sure what should be solution to the problem. I guess command interest should have larger (or configurable) lifetime.

Actions #2

Updated by Junxiao Shi about 10 years ago

  • Tracker changed from Task to Bug
  • Subject changed from nfdc prematurely timeouts to nfdc prematurely timeouts on failed TCP face creation
Actions #3

Updated by Anonymous about 10 years ago

At a minimum, it was probably a bad idea for FaceManager to use a connection/resolution timeout that was the same as the default lifetime. However, FaceManager can only modify the timeout on connect because the resolution timeout is not exposed through *Factory.createFace().

You can increase the command's timeout, but I'm wondering if the manager should be told (implicitly via lifetime or explicitly with some parameter field) how long it should wait. If the manager can't create the face in time (or it looks like it can't), then it should respond with an appropriate error before the command times out.

Actions #4

Updated by Junxiao Shi about 10 years ago

I suggest reducing reducing timeouts on NFD side:

  • DNS resolution: 1300ms
    This is enough to query 5 Name servers
  • TCP connect: 800ms
    This is enough for a handshake.
  • Above assumes 250ms roundtrip time, which is enough for most broadband connections in the world.
Actions #5

Updated by Alex Afanasyev about 10 years ago

Technically, 4 seconds is the timeout for DNS resolution and default timeout for TCP connection is way longer than 4 seconds (not sure why, but I guess people had reasons...)

I would simply increase timeout in command interests...

Actions #6

Updated by Alex Afanasyev about 10 years ago

Just discovered a new reason to update default timeouts. When nrd::Controller sends registration request, NRD may require to fetch certificates from the certification chain, which could take time.

Actions #7

Updated by Junxiao Shi about 10 years ago

ndn::nfd::Controller::start<Command> should take an additional parameter time::milliseconds timeout with default value set to 10 seconds.

I'll make this change if there's no objection.

Actions #8

Updated by Alex Afanasyev about 10 years ago

Yes. This would be a first step for this.

The two "problems" that will remain is:

  • selfRegistration (which may take some time when NRD needs to fetch certificates to validate the request)
  • selecting specific identity to sign the command (separate issue from this).
Actions #9

Updated by Junxiao Shi about 10 years ago

  • Project changed from NFD to ndn-cxx
  • Category deleted (Management)
  • Assignee set to Junxiao Shi
  • Target version deleted (v0.2)
  • Estimated time set to 1.00 h
Actions #10

Updated by Junxiao Shi about 10 years ago

  • Status changed from New to Resolved
Actions #11

Updated by Alex Afanasyev about 10 years ago

  • Related to Task #1508: Enable timeout customization for nfd/nrd::Controller operations added
Actions #12

Updated by Junxiao Shi about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF