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

Added a test requiring a ping time inferior to a certain threshold #842

Closed
tomaka opened this issue Jan 10, 2019 · 2 comments
Closed

Added a test requiring a ping time inferior to a certain threshold #842

tomaka opened this issue Jan 10, 2019 · 2 comments

Comments

@tomaka
Copy link
Member

tomaka commented Jan 10, 2019

I see ping times that tend to be quite high, and that's a bit worrisome.
I think we should add a test where two nodes connect with a Ping behaviour, and ensure that the ping time is inferior to, say, 15ms.

@tomaka
Copy link
Member Author

tomaka commented Jan 10, 2019

This will probably require #659 or multistream-select 2.0, to avoid an extra round-trip for protocol selection when negotiating ping.

romanb pushed a commit to romanb/rust-libp2p that referenced this issue Apr 9, 2019
  * re libp2p#950: Removes use of the `OneShotHandler`, but still sending each
    ping over a new substream, as seems to be intentional since libp2p#828.

  * re libp2p#842: Adds an integration test that exercises the ping behaviour through
    a Swarm, requiring the RTT to be below a threshold. This requires disabling
    Nagle's algorithm as it can interact badly with delayed ACKs (and has been
    observed to do so in the context of the new ping example and integration test).

  * re libp2p#864: Control of the inbound and outbound (sub)stream protocol upgrade
    timeouts has been moved from the `NodeHandlerWrapperBuilder` to the
    `ProtocolsHandler`. That may also alleviate the need for a custom timeout
    on an `OutboundSubstreamRequest` as a `ProtocolsHandler` is now free to
    adjust these timeouts over time.

Other changes:

  * Documentation improvements.
romanb pushed a commit to romanb/rust-libp2p that referenced this issue Apr 9, 2019
  * re libp2p#950: Removes use of the `OneShotHandler`, but still sending each
    ping over a new substream, as seems to be intentional since libp2p#828.

  * re libp2p#842: Adds an integration test that exercises the ping behaviour through
    a Swarm, requiring the RTT to be below a threshold. This requires disabling
    Nagle's algorithm as it can interact badly with delayed ACKs (and has been
    observed to do so in the context of the new ping example and integration test).

  * re libp2p#864: Control of the inbound and outbound (sub)stream protocol upgrade
    timeouts has been moved from the `NodeHandlerWrapperBuilder` to the
    `ProtocolsHandler`. That may also alleviate the need for a custom timeout
    on an `OutboundSubstreamRequest` as a `ProtocolsHandler` is now free to
    adjust these timeouts over time.

Other changes:

  * A new ping example.
  * Documentation improvements.
romanb pushed a commit to romanb/rust-libp2p that referenced this issue Apr 9, 2019
  * re libp2p#950: Removes use of the `OneShotHandler`, but still sending each
    ping over a new substream, as seems to be intentional since libp2p#828.

  * re libp2p#842: Adds an integration test that exercises the ping behaviour through
    a Swarm, requiring the RTT to be below a threshold. This requires disabling
    Nagle's algorithm as it can interact badly with delayed ACKs (and has been
    observed to do so in the context of the new ping example and integration test).

  * re libp2p#864: Control of the inbound and outbound (sub)stream protocol upgrade
    timeouts has been moved from the `NodeHandlerWrapperBuilder` to the
    `ProtocolsHandler`. That may also alleviate the need for a custom timeout
    on an `OutboundSubstreamRequest` as a `ProtocolsHandler` is now free to
    adjust these timeouts over time.

Other changes:

  * A new ping example.
  * Documentation improvements.
romanb pushed a commit to romanb/rust-libp2p that referenced this issue Apr 9, 2019
  * re libp2p#950: Removes use of the `OneShotHandler`, but still sending each
    ping over a new substream, as seems to be intentional since libp2p#828.

  * re libp2p#842: Adds an integration test that exercises the ping behaviour through
    a Swarm, requiring the RTT to be below a threshold. This requires disabling
    Nagle's algorithm as it can interact badly with delayed ACKs (and has been
    observed to do so in the context of the new ping example and integration test).

  * re libp2p#864: Control of the inbound and outbound (sub)stream protocol upgrade
    timeouts has been moved from the `NodeHandlerWrapperBuilder` to the
    `ProtocolsHandler`. That may also alleviate the need for a custom timeout
    on an `OutboundSubstreamRequest` as a `ProtocolsHandler` is now free to
    adjust these timeouts over time.

Other changes:

  * A new ping example.
  * Documentation improvements.
romanb added a commit that referenced this issue Apr 16, 2019
* libp2p-ping improvements.

  * re #950: Removes use of the `OneShotHandler`, but still sending each
    ping over a new substream, as seems to be intentional since #828.

  * re #842: Adds an integration test that exercises the ping behaviour through
    a Swarm, requiring the RTT to be below a threshold. This requires disabling
    Nagle's algorithm as it can interact badly with delayed ACKs (and has been
    observed to do so in the context of the new ping example and integration test).

  * re #864: Control of the inbound and outbound (sub)stream protocol upgrade
    timeouts has been moved from the `NodeHandlerWrapperBuilder` to the
    `ProtocolsHandler`. That may also alleviate the need for a custom timeout
    on an `OutboundSubstreamRequest` as a `ProtocolsHandler` is now free to
    adjust these timeouts over time.

Other changes:

  * A new ping example.
  * Documentation improvements.

* More documentation improvements.

* Add PingPolicy and ensure no event is dropped.

* Remove inbound_timeout/outbound_timeout.

As per review comment, the inbound timeout is now configured
as part of the `listen_protocol` and the outbound timeout as
part of the `OutboundSubstreamRequest`.

* Simplify and generalise.

Generalise `ListenProtocol` to `SubstreamProtocol`, reusing it in
the context of `ProtocolsHandlerEvent::OutboundSubstreamRequest`.

* Doc comments for SubstreamProtocol.

* Adapt to changes in master.

* Relax upper bound for ping integration test rtt.

For "slow" CI build machines?
@romanb
Copy link
Contributor

romanb commented Apr 16, 2019

Closed by #1049.

@romanb romanb closed this as completed Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants