Config Files examples with real data for ipfs-cluster-follow

Hello ; i am trying to setup the IPFS Cluster on a linux server.
I followed the installation from the documentation until the init command.
Now i have the server.json but i struggle to get the difference between the server.json for the clustermain client , the trusted peers and for the follower.

Can someone link me an example how those different service.json should look like for an crdt cluster ?

Also in the trusted peer section should i only enter a IP or does it need another format ?

Thx

Also the follwoing statement in the documentation :slight_smile:
Set follower_mode to true : while non-trusted peers cannot do anything to the cluster pinset, they can still modify their own view of it, which may be very confusing. This setting (which ipfs-cluster-follow activates automatically) ensures useful error messages are returned when trying to perform write actions.

But when i open the service.json i can´t find the follower_mode with any entry
So do i need to add this ? But if yes in which section of the json ?

Hi,

Some options are hidden by default and I think this is one of them. This is part of the cluster section. Always check the configuration reference Configuration - Pinset orchestration for IPFS

Can someone link me an example how those different service.json should look like for an crdt cluster ?

I think you are already following the documentation that tells you what to change in the template. For examples you can check any of the clusters in https://collab.ipfscluster.io/. If you do:

ipfs cat /ipns/ipfs-websites.collab.cluster.io

You can see the follower configuration for that cluster.

Thx hector for your fast reply.
Works fine to load the follower service.json.
I also found the follower_mode now.
Interesting that ravencoin.network-follower-node is not setting it in its json ?!
Does it still wotk ?

Thx

And here for everyone an follower example service.json :

  "cluster": {
    "secret": "186a27c42a285a0fcc9f1be49de493ae84e49a8d77da4f74de344baecfde89ce",
    "listen_multiaddress": "/ip4/0.0.0.0/tcp/18100",
    "connection_manager": {
      "high_water": 400,
      "low_water": 100,
      "grace_period": "2m"
    },
    "state_sync_interval": "2h",
    "ipfs_sync_interval": "2m",
    "monitor_ping_interval": "15s",
    "peer_watch_interval": "5s",
    "mdns_interval": "0",
    "disable_repinning": true,
    "follower_mode": true,
    "peer_addresses": [
      "/dns4/collab-cluster-ams1.cluster.dwebops.net/tcp/18100/p2p/12D3KooWSmCfs84ucWNdf82LFaPZ87mNRnygXwy9aph9J7NBvmvN",
      "/dns4/collab-cluster-sjc1.cluster.dwebops.net/tcp/18100/p2p/12D3KooWEx9uQRNwmEsMysrG7M4yZFKrr5s3MBvFBS75UNxTGeHH"
    ]
  },
  "consensus": {
    "crdt": {
      "cluster_name": "collab_cluster_gutenberg_es",
      "trusted_peers": [
          "12D3KooWSmCfs84ucWNdf82LFaPZ87mNRnygXwy9aph9J7NBvmvN",
          "12D3KooWEx9uQRNwmEsMysrG7M4yZFKrr5s3MBvFBS75UNxTGeHH"
      ],
      "rebroadcast_interval": "10s",
      "peerset_metric": "ping"
    }
  },
  "api": {},
  "ipfs_connector": {
    "ipfshttp": {
      "node_multiaddress": "/ip4/127.0.0.1/tcp/5001",
      "connect_swarms_delay": "30s",
      "ipfs_request_timeout": "5m0s",
      "pin_timeout": "10m",
      "unpin_timeout": "30m",
      "unpin_disable": false
    }
  },
  "pin_tracker": {
    "maptracker": {
      "max_pin_queue_size": 20000,
      "concurrent_pins": 15
    },
    "stateless": {
      "max_pin_queue_size": 1000000,
      "concurrent_pins": 10
    }
  },
  "monitor": {
    "pubsubmon": {
      "check_interval": "15s",
      "failure_threshold": 3
    }
  },
  "informer": {
    "disk": {
      "metric_ttl": "1m",
      "metric_type": "freespace"
    },
    "numpin": {
      "metric_ttl": "5m"
    }
  },
  "observations": {},
  "datastore": {
    "badger": {
      "badger_options": {
        "dir": "",
        "value_dir": "",
        "sync_writes": true,
        "table_loading_mode": 0,
        "value_log_loading_mode": 0,
        "num_versions_to_keep": 1,
        "max_table_size": 67108864,
        "level_size_multiplier": 10,
        "max_levels": 7,
        "value_threshold": 32,
        "num_memtables": 5,
        "num_level_zero_tables": 5,
        "num_level_zero_tables_stall": 10,
        "level_one_size": 268435456,
        "value_log_file_size": 1073741823,
        "value_log_max_entries": 1000000,
        "num_compactors": 2,
        "compact_l_0_on_close": true,
        "read_only": false,
        "truncate": false
      }
    }
  }
}

It is mentioned in the docs that follower_mode is automatically enabled by ipfs-cluster-follow (along with other things). This happens regardless of whether it is in the configuration template or not.

If you were to run a follower with ipfs-cluster-service -c /path/to/follower-config-folder daemon then it would matter and your follower would not consider itself a follower and therefore try to do things that it shouldn’t do. These wouldn’t affect the cluster but surely might become really confusing if you are not familiar with what is happening. Therefore recommendation is to preset follower_mode.