问题描述
我正在支持Rails项目,其中包含Rails应用程序和Solr的其他实例.
I'm supporting on rails project, which contain rails app and additional instance with Solr.
我的环境:轨道3.2.1,红宝石2.1.2,黑子2.1.0,索尔4.1.6.
My environment: rails 3.2.1, ruby 2.1.2, sunspot 2.1.0, Solr 4.1.6.
问题:
云提供商不稳定.我不能使用其他云提供商-这是客户的需求.搜索服务器通常会进行维护,而Web应用程序会停止生产.因此,我考虑如何制作两台相同的搜索服务器,而不是一台,以使系统更稳定:如果一台服务器宕机,另一台将继续工作.
Clould provider is not stable. I cannot use other cloud provider - it is customer's demand. Oftentimes search server goes on maintenance and web application stop working on production. So, I think about how to make 2 identical search servers instead of one, to make system more stable: if one server will be down, other will continue working.
摆脱困境:
- or configure two search servers as Solr Replication
- or configure two search servers as SolrCloud
问题:
- 该怎么办,为什么?
- SolrCloud是更好的解决方案吗?
- 这些变体的PROC和CONS是什么?
- 在哪种情况下最好搭配SolrCloud?
- 在哪种情况下最好进行Solr复制?
推荐答案
您应该能够在论坛中找到Solr主从继承关系与SolrCloud的可能比较,但这是我的理解/经验,因此请轻描淡写.
You should be able to find may comparisons for Solr Master Slave Heirarchy Vs SolrCloud in forums, but these are my understandings/experience from them, so consume it lightly.
- 该怎么办,为什么?这完全取决于您的业务需求.我想说的是,如果您的应用程序仅从SOLR读取数据并且需要从SOLR读取数据的高可用性,那么一个简单的从一个主机到多个从属层次结构就足够了.但是,如果您也希望在写SOLR时也具有很高的可用性,那么SolrCloud是一个正确的选择
- SolrCloud是更好的解决方案吗?没什么比这更好的了,维护SolrCloud需要良好的基础架构,并且必须注意ZooKeepers的可用性,以及节点运行状况,高性能磁盘以提高复制速度等.但是,除此之外,我们无需担心节点之间的数据一致性,因为SolrCloud会注意这一点
- 这些变体的PROC和CONS是什么?如上所述.
- 在哪种情况下最好采用SolrCloud?当您需要Solr Writes和Reads上的高可用性时,我们必须选择SolrCloud另外,如果您不能负担较大的计算机只有一个节点的费用,则可以将索引拆分为分片,并将其保留在较小的配置计算机下.
- 在哪种情况下最好选择Solr复制?当您的应用程序不实时写入SOLR时,复制就足够了,而无需因SolrCloud而变得复杂.而且,与SolrCloud相比,它设置Master Slave相对容易
- What to do and why?This depends purely on your business requirement. I would say if your application just reads data from SOLR and need high availability on reading data from SOLR then a simple one master to many slave hierarchy is more than sufficient.But if you are looking out for high availability on writing to SOLR too, then SolrCloud is a right option
- Is SolrCloud is better solution?There is nothing like better, maintaining SolrCloud needs a good infrastructure and have to look out the availability of ZooKeepers, and nodes health, high performance disk for better replication speed etc.But, other than this we don't need to worry about Data consistency among nodes as this will be taken care by SolrCloud
- What is PROC and CONS of these variants?As described above.
- In which cases is better to coose SolrCloud?When you need high availability on Solr Writes as well as reads, we have to go for SolrCloudAlso, if you cannot afford bigger machines to have one single node, then you can split your index to shards and keep it under smaller config machines.
- In which cases is better to choose Solr Replication?When your application does not write in real time to SOLR, Replication is enough and no need to get complicated with SolrCloud. Also, its comparatively easy to setup Master Slave than SolrCloud
这篇关于Solr复制和Solr Cloud有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!