Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
312 views
in Technique[技术] by (71.8m points)

solrj - Update multiple solr servers at same time

We have three Solr servers with the exact data on three of them. I wanted to update them at the same time when I run the script on one of the servers. Can I use a proxy to update the other two servers in Java(SolrJ)? Has anyone done this before?

question from:https://stackoverflow.com/questions/66051669/update-multiple-solr-servers-at-same-time

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Do not do this manually. You are reinventing Solr features.

For data with infrequent updates, maybe once per day, use a master server and a set of query (slave) servers that replicate the index. The replicas will check for changes on a schedule, maybe once per hour or every 15 minutes.

For frequent updates, use Solr Cloud. An update sent to any node in the cluster will automatically be forwarded to the leader for that shard. It will be indexed their and replicas will be notified to fetch it and index it on the replicas.

Solr cannot guarantee that updates will be simultaneous on all replicas. Solr is not a database and updates are not transactional. If you want transactions, use a database.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...