How to specify an external address for IPFS-Cluster?

I have two IPFS-clusters deployed on a separate AWS EKS clusters. For simplicity, let’s call them Alice (main, bootstrapping) and Bob.

I attached AWS LoadBalancer to the Alice cluster and Bob cluster successfully connects to it.

When I run ipfs-cluster-ctl id command on the Bob cluster I see the following addresses:

12D3KooWPsWurnD9SKVCERyeNcfJQhRnoBoWkc4rEwmdQugucGaT | itn-cluster-follow | Sees 1 other peers
  > Addresses:
    - /dns4/<alice-domain>/tcp/9096/p2p/12D3KooWG5uRjZFYrfPYBqZye6qv7xawYANo6vcANxSVspG5pDZH/p2p-circuit/p2p/12D3KooWPsWurnD9SKVCERyeNcfJQhRnoBoWkc4rEwmdQugucGaT
    - /ip4/127.0.0.1/tcp/9096/p2p/12D3KooWPsWurnD9SKVCERyeNcfJQhRnoBoWkc4rEwmdQugucGaT
    - /ip4/192.168.121.233/tcp/9096/p2p/12D3KooWPsWurnD9SKVCERyeNcfJQhRnoBoWkc4rEwmdQugucGaT
    - /ip4/<alice-ip-1>/tcp/9096/p2p/12D3KooWG5uRjZFYrfPYBqZye6qv7xawYANo6vcANxSVspG5pDZH/p2p-circuit/p2p/12D3KooWPsWurnD9SKVCERyeNcfJQhRnoBoWkc4rEwmdQugucGaT
    - /ip4/<alice-ip-2>/tcp/9096/p2p/12D3KooWG5uRjZFYrfPYBqZye6qv7xawYANo6vcANxSVspG5pDZH/p2p-circuit/p2p/12D3KooWPsWurnD9SKVCERyeNcfJQhRnoBoWkc4rEwmdQugucGaT

It seems like the Bob cluster uses Alice cluster as a circuit relay.

My questions are:

  • Is it ok that Bob does not have its own external addresses and uses Alice as a relay?
  • Is there any way to specify external addresses for IPFS-Cluster, like announce addresses in libp2p?
  • If I connect for example 100 clusters to one bootstrapping cluster, does it mean that all network communication goes through bootstrapping peer (since it become a circuit relay for 100 clusters)?

There is an “enable_relay_hop” setting which is true, so you can disable peers being relays.

No. There’s an issue: Announce/NoAnnounce/FilterAddrs swarm options · Issue #952 · ipfs-cluster/ipfs-cluster · GitHub

I don’t think that connection will be relayed through a peer when other addresses that are not relays exist for that peer and work. However, I have lost a bit of track of relay-stuff in libp2p. I think current relay implementation is just used for doing hole-punching and not relaying all the data (we use: libp2p package - github.com/libp2p/go-libp2p - Go Packages).