Max no of topics in pubsub

Is there a limit on the max no of topics that can be created on a node on a fully connected n/w
I am using libp2p-pubsub-router to store large no of keys(for files), on a large scale p2p n/w, The key should be accessible from all the nodes at all times. Will there be any impact on performance if i use million of keys(topics) with hundreds of nodes

I’m not aware of the fundamental scale limits, but I believe IPNS uses the pubsub system. This ought to give you an approximate indication of scale (i.e. the number is “very big”).

I wish I could be more helpful!

The maximum is basically whatever can fit into a single message (which has a default maximum size of 1MiB). Since topic names are variable length the maximum number of topics is variable as well issue.

Note: your system may not actually require millions topics to create a KV store. You could probably make a modified version of go-libp2p-pubsub-router that tracks the keys but operates on a single “mydb” channel. There are some issues in the go-libp2p-pubsub-router repo that might be of interest or you could explore on your own and then raise some issues about merging in the changes you found useful.