iamedu
iamedu

Reputation: 405

Hibernate Search lock on writing makes querying slow

I am using hibernate search for a project, it is writing heavily to the DB and thus to the lucene index.

From time to time I experience that queries are too slow, that happens when the app is under heavy usage.

I was thinking in moving to a cluster configuration, and synchronizing every 10 minutes.

Based on your experience is this a good aproach? How long should I sync?

Upvotes: 0

Views: 352

Answers (1)

Hardy
Hardy

Reputation: 19119

Provided index and database updates are the real cause for the slowdown clustering can indeed be the solution. You will have to try and potentially profile more to get to the root of the problem.

Regarding the cluster configuration sync time. Let's start the docs here first

The recommended value for the refresh period is (at least) 50% higher that the time to copy the information (default 3600 seconds - 60 minutes).

and

If a copy is still in progress when the following refresh period elapses, the second copy operation will be skipped.

So the question is, how big is your index and how long does it take to sync the index to the slave. Again, that is something you need to try. The other factor is how long you can/want to wait until a change is searchable. The refresh period is in this sense very application specific.

Upvotes: 1

Related Questions