GithubHelp home page GithubHelp logo

Comments (4)

hsanjuan avatar hsanjuan commented on June 1, 2024

I suppose they are automatically saved into service.json file in cluster peer section?

Yes that is the default behaviour (you can check it).

If a peer is shutdown cleanly and the leave_on_shutdown option is set to true, the that peer will leave the cluster/consensus (and cluster_peers will be emptied). On startup it needs to use the bootstrap list or be added from a member of the cluster with peers add.

If a peer is shutdown cleanly and the leave_on_shutdown option is set to false, the peer will save current list of peers in cluster_peers and shutdown without leaving the cluster/consensus. This means that other peers will still try to contact it. In a 2-peer cluster, if one goes down, a leader election will be triggered and, since no majority is possible, no leader will be chosen, so many operations will fail (pins, unpins) in the meantime, but things will recover as soon as it comes back up.

Does that make sense to you or would you suggest improvements on this front?

from ipfs-cluster.

bgadmin avatar bgadmin commented on June 1, 2024

@hsanjuan Thanks for fast response, this makes perfect sense, just wanted to double check.

No suggestions for now, this is awesome 👍

Where can "leave_on_shutdown" parameter can be specified?

from ipfs-cluster.

hsanjuan avatar hsanjuan commented on June 1, 2024

@bgadmin in ~/.ipfs-cluster/service.json

If you don't see this parameter, I recommend that you ipfs-cluster-service -c /tmp init and compare your version with the newly created one. It should create something like:

{
    "id": "QmXaNvRpnr3eNpSRAjhAF8yctGPPpxX1B2TetSzuPVyRbE",
    "private_key": "blabla....",
    "cluster_peers": [],
    "bootstrap": [],
    "leave_on_shutdown": false,
    "cluster_multiaddress": "/ip4/0.0.0.0/tcp/9096",
    "api_listen_multiaddress": "/ip4/127.0.0.1/tcp/9094",
    "ipfs_proxy_listen_multiaddress": "/ip4/127.0.0.1/tcp/9095",
    "ipfs_node_multiaddress": "/ip4/127.0.0.1/tcp/5001",
    "consensus_data_folder": "/tmp/data",
    "state_sync_seconds": 60,
    "replication_factor": -1,
    "monitoring_interval_seconds": 15,
    "allocation_strategy": "reposize"
}

Anything not specified will get defaults.

from ipfs-cluster.

hsanjuan avatar hsanjuan commented on June 1, 2024

please re-open if needed!

from ipfs-cluster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.