ouroboros-network icon indicating copy to clipboard operation
ouroboros-network copied to clipboard

[FR] - Query node for list of outgoing/incoming connections and its state

Open Scitz0 opened this issue 1 year ago • 11 comments

Internal/External External

Area Other

Describe the feature you'd like When in P2P mode, we need a way to query the node for currently established incoming and outgoing connections with their state. State of connection should include hot/warm status for outgoing and uni-directional, bi-directional, duplex mode for all. The current metrics you can get from the node provide the numbers, but not specifically what IP has what state and if its incoming/outgoing. This could be included in Prometheus or EKG metrics, alternatively as a cardano-cli query.

This would be very beneficial when troubleshooting topology issues or just for general health checks that the node has connections to own nodes and in the preferred mode.

Describe alternatives you've considered Before P2P we could use system tooling to query for established incoming and outgoing connections as they where all uni directional. This is no longer possible with P2P enabled. You can only see 'active connections'.

Scitz0 avatar Jul 22 '24 07:07 Scitz0

This has been missing since introduction of P2P and raised unofficially across discord/tg channels. In absence of interest/plan to implement, we are forced to drop support for 'direction' on gLiveView peers section - but it is an important information for analyzing and monitoring peer behaviors connecting to the node

rdlrt avatar Jul 22 '24 11:07 rdlrt

Additionally when an SPO uses containers that do not use --network host, and publishes the container ports, this can add additional complexity to confirming the state of node connectivity. Changes in various container network technologies (CNI vs. Aardvark, etc.) may also reduce the visibility of connectivity from the container host point of view, which adds additional complexity for stake pool operators.

While these issues are not limited to containers running a node, this request would provide a solution which could also address issues with limitations in the various technologies/architectures employed to run a node.

TrevorBenson avatar Jul 22 '24 20:07 TrevorBenson

Additionally when an SPO uses containers that do not use --network host, and publishes the container ports, this can add additional complexity to confirming the state of node connectivity. Changes in various container network technologies (CNI vs. Aardvark, etc.) may also reduce the visibility of connectivity from the container host point of view, which adds additional complexity for stake pool operators.

While these issues are not limited to containers running a node, this request would provide a solution which could also address issues with limitations in the various technologies/architectures employed to run a node.

The issue I mentioned appears to have been resolved with recent updates. However, I'd still love to see this feature implemented as it provides a great amount of additional detail.

:pray:

TrevorBenson avatar Jul 28 '24 23:07 TrevorBenson

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] avatar Aug 28 '24 02:08 github-actions[bot]

Issue (feature request) is still highly requested by me and the broader community. A response for plan of implementation would be appreciated.

Scitz0 avatar Aug 28 '24 09:08 Scitz0

+1 Currently, the node doesn't provide a query feature to list outgoing/incoming connections in p2p. This feature could be prioritized to see better metrics for the p2p node.

krunks-dev avatar Sep 16 '24 20:09 krunks-dev

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] avatar Oct 18 '24 02:10 github-actions[bot]

Bump to keep open

Scitz0 avatar Oct 18 '24 04:10 Scitz0

This could be included in Prometheus or EKG metrics, alternatively as a cardano-cli query.

I think a new cardano-cli query would be the best approach.

coot avatar Oct 31 '24 17:10 coot

I think a new cardano-cli query would be the best approach.

We can do that, but we need consensus/network to expose the data. @nfrisby> would that be possible?

smelc avatar Jan 17 '25 09:01 smelc

I've been working on this. So far I have a bunch draft PRs / branches:

  • https://github.com/IntersectMBO/ouroboros-network/pull/5046
  • https://github.com/IntersectMBO/ouroboros-consensus/tree/coot/public-network-state
  • https://github.com/IntersectMBO/cardano-api/tree/coot/public-network-state
  • https://github.com/IntersectMBO/cardano-cli/tree/coot/public-network-state
  • https://github.com/input-output-hk/ekg-forward/tree/coot/network-public-state
  • https://github.com/IntersectMBO/cardano-node/tree/coot/public-network-state (early stages)

coot avatar Jan 17 '25 19:01 coot