Choosing Subnets

Hi, this is a bit of a meta question, but I was wondering: why would someone choose one subnet over another when creating a canister?

Context: I’m developing an option in Juno to allow users to spin up a Satellite or Orbiter on a specific subnet, so I’ll eventually need to document this for myself, as well as for newcomers to the IC. So, I’m looking for an “explain it to me like I’m 5” type of answer.

Additionally, I’m aware of the get_default_subnets function in the CMC canister to fetch the list of subnets, but is there an on-chain source where I can gather subnet metadata?

For example, if the criteria for choosing subnet A is the number of canisters, what source can I use to obtain this information through an IC call?

3 Likes

One reason is to avoid subnets with high load. See the difficulties that overloaded subnets have caused recently. The other reason I see is when you develop a canister that integrates tightly with a service that is mainly located in a specific subnet. Cross-subnet calls take significantly longer to process (~4 extra consensus rounds in the best case), so choosing to have your canister on the same subnet as the service you’re integrating with can cause significant performance improvements

AFAIK, subnet metadata is mostly in the registry. Don’t ask me how to query it though. I have no idea about that

4 Likes

Thanks for the clear explanation @Severin ! :pray:

I’m not sure I’ll invest much time tracking that down, but now I’m curious to learn more about the registry.

My opinion: I believe you should be located in the same subnet as your friends, colleagues, people and projects you’re most likely to collaborate with.

"“Explain it to me like I’m 5” (ChatGPT)

Think of it like this: To work well with your friends and colleagues, it’s important to be in the same ‘neighborhood’ as them. In tech terms, that ‘neighborhood’ is called a subnet. When you’re in the same subnet, it’s easier to communicate and collaborate on projects, just like it’s easier to hang out with friends when you live close by.

1 Like

I documented “Subnet” as follow in Juno’s terminology:

Thanks for the inputs.

3 Likes