How to let Nacos create a sharding of the service?

48 Views Asked by At

I'm implementing a distributed text search engine. A document need to be sent to a corresponding indexer appliction based on the key. So there will be indexer-1, indexer-2...indexer-n spring applications. We cannot decide how many indexer there will be at the begining, but all indexer will register itself on Nacos(any register center).

Now I want Nacos create the sharding of the service automatically. Say there are 10 indexer in the cluster, then 3 of them will be indexer-1, 3 indexer-2 and 4 indexer-3.

(I know the existence of ElasticSearch, and need to implement my own)

Now I am just sitting there trying to wrap my head around.

0

There are 0 best solutions below