Comparison of Examine Indexes Between Servers in Load Balanced Environment
I have a load balanced site (2 servers) and occasionally, for reasons currently unknown, the search index on the slave node might lose content and stop returning the results it should.
When I look at the Index directory in the Temp folder after this is brought to my attention it looks very much like it was starting to rebuild the index and stopped. Nothing of any interest in the logs and it's not a regular occurrence but is cause for concern at the moment due to a critically important time for the site and in particular the data that disappears.
The data is in an Index of its own and the configuration looks like this:
What I am looking to do is to somehow get notified when the index gets into this state and looking for some ideas.
My thoughts at the moment are to perhaps implement something in a similar fashion the lastsync file and write a index document count to file on disk and then perform some sort of comparison between the file on each server.
Obviously, this is a short-term solution as I would like to identify and fix the problem at source but if anyone has any ideas in the meantime I'd appreciate any input.
a custom healthcheck endpoint that checkes indexes (we use this), if they go unhealthy the box is binned and replaced with a fresh one, which will build its cache fresh on boot.
I saw a dashboard add-on for the backoffice that shows this information from all your servers in one location so you can monitor, and then rebuild the index at a push of a button.
That was something I considered but then I was not sure how from a Health Check I can independently check the status of indexes on each server - would it not only check the index on the server executing the HealthCheck (which would always be the same, master node)? Is your solution something you would care to share more information on?
Any ideas what the name of the package was? The more I am coming up against challenges relating to the state of the load balanced server instances the more I am thinking it is actually a necessity to have something like that. At the moment there is a lot of manual file comparisons between the servers which is not ideal or efficient.
Comparison of Examine Indexes Between Servers in Load Balanced Environment
I have a load balanced site (2 servers) and occasionally, for reasons currently unknown, the search index on the slave node might lose content and stop returning the results it should.
When I look at the Index directory in the Temp folder after this is brought to my attention it looks very much like it was starting to rebuild the index and stopped. Nothing of any interest in the logs and it's not a regular occurrence but is cause for concern at the moment due to a critically important time for the site and in particular the data that disappears.
The data is in an Index of its own and the configuration looks like this:
ExamineIndex.config
ExamineSettings.config
ExamineIndexProvider
ExamineSearchProvider
What I am looking to do is to somehow get notified when the index gets into this state and looking for some ideas.
My thoughts at the moment are to perhaps implement something in a similar fashion the lastsync file and write a index document count to file on disk and then perform some sort of comparison between the file on each server.
Obviously, this is a short-term solution as I would like to identify and fix the problem at source but if anyone has any ideas in the meantime I'd appreciate any input.
Thanks, Simon
2 solutions I know of:
a custom healthcheck endpoint that checkes indexes (we use this), if they go unhealthy the box is binned and replaced with a fresh one, which will build its cache fresh on boot.
I saw a dashboard add-on for the backoffice that shows this information from all your servers in one location so you can monitor, and then rebuild the index at a push of a button.
Hi Phil,
Thanks for your input.
That was something I considered but then I was not sure how from a Health Check I can independently check the status of indexes on each server - would it not only check the index on the server executing the HealthCheck (which would always be the same, master node)? Is your solution something you would care to share more information on?
Any ideas what the name of the package was? The more I am coming up against challenges relating to the state of the load balanced server instances the more I am thinking it is actually a necessity to have something like that. At the moment there is a lot of manual file comparisons between the servers which is not ideal or efficient.
Cheers, Simon
we have aws fire the healthcheck on all servers (master and slaves)
https://github.com/CrumpledDog/ExamineDistributedDashboard
Thanks, I'll take a look. I'm not using AWS but I'm guessing the principle still applies to other environments.
Hi Somon,
Are you running on Azure web apps. I think you need to update your Examine configuration then.
https://our.umbraco.org/documentation/Getting-Started/Setup/Server-Setup/azure-web-apps#best-practices
Dave
Hi Dave,
No, surprising as it might be these days I am in fact running managed servers that are not on AWS or Azure or any of that sort of black magic :)
Are you handling some CacheRefresher events in your code. We had a issue in one of ours that stopped the "slave" servers from updating.
Dave
Not really, we touched on that in another thread the other day:
See Distributed cache lastsync value on the master instance is behind the slave
It has been fine for the past few days so not sure what caused it last time.
EDit: The two may well be related though!
is working on a reply...