> On 16 Mar 2022, at 04:27, Sam Lee <samlee...@yahoo.com> wrote: > > On 2022/03/15 15:37:59 "Ing. Andrea Vettori" wrote: >> in our setup we have two Solr servers and we index documents to both >> (we keep track of the last sync for each server so they can also be >> not aligned in a certain moment for example for maintenance). > > Thank you for proposing this simple setup. How do you "keep track of the > last sync"? Do you somehow keep track of that inside Solr, or is it > manual record keeping? (e.g. in a physical notebook)
It depends a lot on your source data. For us, each source has a ‘last modified timestamp’ and the program that feeds Solr keeps track of the last timestamp it has processed, for each server. If you can’t use this approach I think you can find a similar way and you already probably have it, unless you are reindexing everything each time. > When one of the Solr servers goes offline for maintenance, how do you > make it "catch up" with the other server when it comes online again? > In other words, how do you keep the two servers in sync? Once a server comes back, the program that feeds Solr just starts at the last timestamp it recorded. So when both servers are online, the program keeps the servers in sync simply because it sends the same data to both. When one server is down, the program keeps feeding the one that’s up (updating its last synced time) and not the other (and not updating its last synced time). When the server comes back up, the first sync will align both servers since one server is fed with just the ’new’ data and the other with more data. Hope this helps — Ing. Andrea Vettori Sistemi Informativi B2BIres s.r.l.