0

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.

wenjun
  • 1
  • 1
  • Please provide enough code so others can better understand or reproduce the problem. – Community Apr 28 '23 at 16:27
  • Are you sure that a solution that requires the change of _exactly this_ property is a very maintainable one? This property is provided by Spring automatically on purpose and while it might be possible to change it at runtime, it probably will do more harm than good to your application when it starts to fiddle with such internal stuff. – cyberbrain Apr 28 '23 at 20:45
  • No, not exactly this property. Actually any property is fine, as long as the solution create the sharding of the service automatically. In cloud environment, every indexer will register under the name "indexer", and probably the easier solutiuon now is to let the register center to do the job. I currently use Nacos, and are seeking a solution regarding Nacos. I'v edited the original question. – wenjun Apr 29 '23 at 06:30

0 Answers0