Basic Network Topology

Hi, I’ve taken the stake pool course, but it doesn’t go into depth about what type of topology your network should have and how it should connect to other relays both internally and those external to yours.

Let’s say you have 1 BP and 2 relays.
Say the symbol ‘<>’ represents two-way communication as set up by host configuration file (incoming traffic many to 1) and host topology file (outgoing traffic 1 to many) for the relays, and two-way communication set up by host configuration (incoming traffic 2-to-1) from the relays to the BP, and host topology file (outgoing traffic 1-to-2) for the BP to both relays.

Is there flexibility and preferability in how your BP and relays should communicate among themselves and with other relays? Let’s say you have the following setup, 1BP and 2 relays:

BP <> relay1 <> ESR1
BP <> relay2 <> ESR2

Where ESR1, ESR2 are sets of relays mostly operated by other SPOs;i.e, External Set of Relays.

  1. should relay2 be included in ESR1, and relay1 in ESR2, or should they (ESR1,2) be all external relays owned by other SPOs?

  2. Should ESR1, ESR2 be mutually exclusive to maximize diversity? and speed? of communication, be the same to maximize redundancy, or have some overlap and exclusivity for a combination of the two? I guess it depends to some extent on the quality of relays you select for ESR1, ESR2.

  3. I’ve read some where that there is a limit to how many relays you want to ‘talk’ to…a number of posts put is somewhere around 15 tops. I guess too much traffic if you go higher?

ADAfrog is king!

1 Like

Hi JT,

Outbound peer connections utilize more resources and require more overhead than inbound peer connections. It makes sense to have your relays relatively close to your bp to help achieve lower latency. I manually manage my relay topologies - other use services such as topologyUpdater. Within relay topologies I try to include 3rd party relays geographically close to the specific relay - I also include others. My relay topologies are not mutually exclusive as I am running numerous, and there is a bit of overlap.

You define target outbound connections to establish within your relay topo. These connections help you pull blocks from the network. When other SPOs include your relays in their topologies (inbound connections), they can pull blocks from you - which makes them critical for producing viable blocks. You do not need to have your relay in every 3rd-party topology uses within your own topologies, but you want to ensure your relays are included in a number of other operators’ topologies. When include relays a successful pool registration, as we do not yet have p2p, IOG adds your relays to their topology (updates every 12 hours).

I recommend keeping the total valency count relay within your relay topologies to 15-18. You will be able to visibly see performance degradation if this number is too high.

Hope this helps.

Your friend, FROG

1 Like

Awesome! Thanks!

1 Like

FROG, does this mean that I shouldn’t have my own nodes communicate in all 6 directions with one another on my 3 node (1BP, 2relay) topology?

e.g. BP<>R1, BP<>R2, R1<>R2, especially the relays?

Re-editing: previous post was too cringy. :smiley: lol

Basically pulling blocks for processing on my BP from a global pool of relays may look like…

BP<>R<>MSR<> global pool of relays (my relays pulling blocks from MSR for processing on my BP)

where MSR is ‘my subbed relays’; i.e., other SPOs’ relays I’m subbed to. Let OSR ,‘other subbed relays’, be other SPO’s relays that have at least one relay subbed to at least one of my relays, OBP their corresponding BPs, and OR be their corresponding relays,then traffic for them could look like…

OBP<>OR<>OSR<> global pool of relays (other BPs relays pulling blocks from my relays and others’ for processing on their BPs).

Argggh, the rabbit hole goes too deep! :wink:

Internal topologies:

BP<>R1 and BP<>R2, not R1<>R2

3rd-party SPO relays in your relay topologies:

BP<>R>MSR<>

your relays included in 3rd-party SPO relay topologies:

BP<>R<MSR<>

you need all of these

2 Likes

Thanks, FROG…hope I don’t drive you up the wall as much as I do myself. :wink:

Thanks Frog!
I added another relay, and have been having trouble since. Your topology post fixed my problem instantly…no issues whatsoever! Lessson learned, no R1<>R2 communication directly - i.e, don’t sub your relays to one another. I’ve got one relay in the cloud, one at home (for practice), and the BP is also at home. Will try to finish stakepool course today and get my BP onto testnet in an active mode rather than this passive mode I’ve been doing for quite some time now.

1 Like