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

IPFS Node topology-based pinning strategy #159

Closed
segator opened this issue Oct 1, 2017 · 5 comments · Fixed by #1468
Closed

IPFS Node topology-based pinning strategy #159

segator opened this issue Oct 1, 2017 · 5 comments · Fixed by #1468
Assignees
Labels
P0 Critical: Tackled by core team ASAP status/in-progress In progress topic/user-story User story

Comments

@segator
Copy link

segator commented Oct 1, 2017

In some cases you would want to choice specific nodes to pin replication. Think the case you use JBOD and have 1 IPFS Daemon per disk, and also have multiple machines.
You would want to avoid ipfs cluster replicate a file in same machine diferent disks, you would want always to pin the file in diferent hosts and even maybe diferent region hosts.
I was looking into the documentation but I dind't found anything and could be awesome, because I am afraid to use a overlayFS over multiple drives as a single IPFS Repository, if one disk fail you could lose all the reopsitory located in the machine and you will need to redownload it again. In the case I say, you should only need to redownload the failed drive.

@hsanjuan hsanjuan self-assigned this Oct 2, 2017
@hsanjuan hsanjuan added status/ready Ready to be worked topic/user-story User story exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue labels Oct 2, 2017
@hsanjuan
Copy link
Collaborator

hsanjuan commented Oct 2, 2017

Yes, currently we do not have a pinning strategy that provides this, but it's easy to do.

I mark this issue as ready so it can be worked on.

@hsanjuan hsanjuan changed the title IPFS Node Pining choice strategy IPFS Node topology-based pinning strategy Oct 2, 2017
@hsanjuan
Copy link
Collaborator

hsanjuan commented Oct 2, 2017

Implementation hints:

  • An new informer should provide a custom metric "group". Probably picked from config file.
  • An allocator should prioritize hosts among different groups in the priority list. Discuss: should it fail when replication factor > different groups?
  • When deciding which host to pick from a group, it might be worth to sort them by free-space
  • This opens the question of sorting based on secondary metrics/allocator, or having metrics report multiple values. Might be worth to make Metric value an array of values to order.

@segator
Copy link
Author

segator commented Oct 2, 2017

well reading the documentation, I see you could use a cluster as a daemon so you could group nodes creating diferent clusters.

1- Agree
2- Depends on the case, maybe you want prioritze replication to your group but if a node is offline on your group go to the next choice, I will implement something similar as use CEPH with CRUSH maps.
3-I will define diferents strategies, most-free, fill-up first with host weight or random. if you think about HDD power saving you always prefer to have some group of files in the same disk.(because de HDD spin down)
4-Complexity don't needed now but it's fine to think about.

@hsanjuan
Copy link
Collaborator

hsanjuan commented Oct 4, 2017

True, you can do cluster-composition, where one of the cluster peers of a cluster appears as an ipfs node to a different cluster. The higher cluster would use "pin everywhere" replication, and each sub-cluster would be a region (for example) with replication factor 1 (for example). This would make a pin to be replicated in every region, and for each region, one of the available nodes would be selected. It adds a layer of complexity though.

@hsanjuan
Copy link
Collaborator

hsanjuan commented Oct 4, 2017

@segator, most-free strategy is the default

@hsanjuan hsanjuan added this to the All open issues with difficulty:medium or lower are fixed [Q4O1] milestone Oct 10, 2017
@hsanjuan hsanjuan added the P2 Medium: Good to have, but can wait until someone steps up label Oct 11, 2017
@hsanjuan hsanjuan removed their assignment Oct 22, 2017
@hsanjuan hsanjuan removed this from the Open issues with difficulty:medium or lower milestone Jun 26, 2018
@hsanjuan hsanjuan self-assigned this Sep 7, 2021
@hsanjuan hsanjuan added P0 Critical: Tackled by core team ASAP status/in-progress In progress and removed help wanted Seeking public contribution on this issue exp/intermediate Prior experience is likely helpful P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked labels Sep 7, 2021
@hsanjuan hsanjuan added this to the Release v0.14.2 milestone Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 Critical: Tackled by core team ASAP status/in-progress In progress topic/user-story User story
Projects
None yet
2 participants