The tests I ran were 100% write-only.
Quote:
But then rather than copying the index periodically back to the slaves, I would see if you can manage to run the queries on this third application as well.
I don't see any alternative, as if you don't run the queries on the same node as the writer we'd at very least need this writer to flush all changes after each commit, which would get you the performance of non-NRT.
Thanks for the clarification, I get what you mean now. You mentioned a way to do this in Wildfly, could you give me some pointers or keywords so I can look and see if something similar is possible in Tomcat? I like this solution even if I might not implement it right now because it sorta decouples the search and indexing service from the main monolith, which is the general direction I'm heading towards with regards to the application's overall architecture.
Quote:
Two other alternatives:
- use the Elasticsearch integration
How stable is the Elasticsearch integration at this time? Is it ready for production? Moving to Elasticsearch or Solr is on the TODO list for me due to the additional search capabilities that they offer, so I'll keep an eye on this.
Quote:
- switch to the non-NRT configuration and compensate with other tuning options.
Quote:
One more idea: since Hibernate Search 5.0 if you enable "async indexing" there also is a configuration property index_flush_interval which allows you to bound the async flush period.
I understand you said you want the service to be "as much synch as possible", but if you can tolerate enabling async with a rather small max delay, then the Hibernate Search flushing engine might be able to speedup the index writes significantly. For the record, many Lucene based services (like Elasticsearch) default to a rather large 5 second flush cycle as that has great improvements on the write throughput. I believe setting just 200ms in your case could help.
Actually, any non-NRT configuration suits me well as long as indexing time is reasonable and doesn't hurt the user perception (slowness). I can also tolerate some small delays (a few seconds) that's why I said "as synchronous as possible" instead of "perfectly synchronous". This might be one of the cases where a best-effort approach would be good enough.
The async indexing option with a bounded flush period sounds very attractive to me. I'll run some more tests tomorrow. Thank you!