Lucene.NET Load Balancing with Asp.NET MVC Website

We want to start load balancing on our website, which currently uses lucene.net to store about 200k documents. We have an MVC website with some WCF services that do searches and additional functionality. How can you achieve load balancing and use Lucene?

I thought of two ways:

  • The presence of an index, duplicated on each machine used to load the balance.
  • Store the index on an external server that will contain this index for search only.

Can you help me with some suggestions, explanations, or anything helpful?

Would any of the above approaches be more appropriate, or are there any other solutions?

+3


source to share


2 answers


One alternative is to use Elasticsearch (which itself uses Lucene under the hood).

This would be a big architectural change, but depending on your solution, it might still be trivial.



Elasticsearch gives you load balancing out of the box and you don't need to do your own index sync.

+3


source


You can duplicate the index on every machine, but be careful that keeping the indexes in sync can be a pain. I've seen this approach used in other enterprise applications.

On the other hand, a single instance of an index can create a search bottleneck.



In this case, I would say take your poison. I would probably try a single index and see how performance is affected. If that doesn't work, you will have to go with duplicate index and make sure they are always in sync

0


source







All Articles