Found this super helpful (How to switch Lucene to Solr), but I'm still not clear on which servers Solr needs to be installed on in a multi-server environment. Any help would be appreciated. Thanks!
3 Answers
You'll want to install Solr on it's own server(s). Solr can be very resource demanding especially when you have a large number or Solr cores.
In terms of hardware, the best practices tend to be
- Provide as much memory as you can afford
- Use SSDs if possible
- If using mechanical disks, setup at least 4 volumes with a set of dedicated heads for each: OS, commit log, SSTables, Solr data If using SSDs you can choose either RAID0 or JBOD
- Additional cores are helpful because it will increase query/indexing throughput (usually each Sitecore index will be one Solr core)
If you are not able to install Solr on it's own machine, you'll probably want to install it on the Content Management box as you really don't want to slow down your CD boxes. Again, it's not advised as there will most likely be a performance hit to content authors.
-
That is likely not going to be an option in this case unfortunately :( Commented Feb 14, 2017 at 20:01
-
updated answer to include option if not able to install Solr on it's own box Commented Feb 14, 2017 at 20:09
Solr infrastructure can vary widely depending on your needs: how much traffic you get and how much Solr is being utilized by your website or even other applications.
Solr does not need to be installed locally on any specific server type. Solr instances typically have their own dedicated servers. However there is no mandate for this and you can certainly install Solr on any box/instance you want, it'd be just like installing SQL Server and your Sitecore instance on the same box(es) -- you can do it, it's just highly unrecommended.
Whether you stick a lone instance of Solr on an existing Sitecore server/instance, or stick the lone instance on its own server, or install a cluster of solr instances spread across each existing Sitecore server/instance, or give each cluster its own dedicated servers, is all completely up to you given your performance needs and the resources available to your project.
Many people choose to run dedicated Solr clusters, see: https://cwiki.apache.org/confluence/display/solr/SolrCloud. This setup gives you replication, performance, and scalability.
You'll need to consider certain performance costs depending on how you set up your infrastructure. There is a good wikipage that goes through a lot of common problems people experience with Solr performance: https://wiki.apache.org/solr/SolrPerformanceProblems
Basically, like with any database/datastore, make sure the server Solr is being installed on has good hardware (SSD's), and that Solr is configured correctly to use those resources (such as RAM).
The answer will be partly informed by why you're switching to Solr. If you have a low-trafficked, smaller site and need to take advantage of Solr's language parsing capabilities, for example, you can get away with running it alongside your Sitecore application on the same server.
Keep in mind that Solr can be a memory hog. If you're opting to run it alongside you're Sitecore application on the same server, you want to take steps to constrain its memory usage. This is a complex topic, but this page will get you started: https://cwiki.apache.org/confluence/display/solr/JVM+Settings As a rule of thumb, give Solr enough RAM to keep the entire index in memory.
If you're switching to Solr because you need to scale your application, Solr needs its own dedicated hardware. A single server will work fine for most mid-level Sitecore applications. Solr Cloud should be considered when your indexes are very large and require sharding or when high-availability of search is a requirement.