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

Adding a method to get accurately the bandwidth consumption (download/upload) per CID #1788

Open
sameh-farouk opened this issue Oct 24, 2022 · 1 comment
Labels
kind/architecture Core architecture of project kind/enhancement A net-new feature or improvement to an existing feature status/deferred Conscious decision to pause or backlog

Comments

@sameh-farouk
Copy link

sameh-farouk commented Oct 24, 2022

Describe the feature you are proposing

Adding a method to get the bandwidth consumption per CID

Additional context

I'm not aware of any (straightforward) way/method to get this info from the cluster client or from the IPFS client.

I'm implementing a pinning service that uses the cluster client to pin data to a cluster of IPFS peers, I need to be able to query the cluster for information about the bandwidth consumption per CID, and the storage. for storage, I can get an IPFS shell and query the node about the recursive data size of a root CID. but I have a hard time thinking about how I can get the bandwidth-related info in an accurate way that can be used for a billing service.
I read somewhere about the possibility of getting such info by monitoring some logs, or by querying the bit swap ledger for how many times a block was requested. but none is reliable or straightforward to production use.

This was the most helpful info i was able to find:
https://gitcoin.co/issue/23631
https://github.com/tzdybal/cidtrack

Given that it was 2 years ago, probably a lot of things was changed/improved.

@sameh-farouk sameh-farouk added the need/triage Needs initial labeling and prioritization label Oct 24, 2022
@hsanjuan
Copy link
Collaborator

hsanjuan commented Mar 3, 2023

This is a problem beyond what cluster can solve right now (it is Kubo that downloads the things after all).

The problem about how much storage a Pin takes is also difficult (given overlaps). Kubo/ipfs needs to be instrumented to do that sort of accounting.

@hsanjuan hsanjuan added kind/enhancement A net-new feature or improvement to an existing feature kind/architecture Core architecture of project status/deferred Conscious decision to pause or backlog and removed need/triage Needs initial labeling and prioritization labels Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/architecture Core architecture of project kind/enhancement A net-new feature or improvement to an existing feature status/deferred Conscious decision to pause or backlog
Projects
None yet
Development

No branches or pull requests

2 participants