You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solr/solr-ref-guide/modules/deployment-guide/pages/solrcloud-distributed-requests.adoc
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,22 +183,26 @@ One or more replica types that are preferred.
183
183
Any combination of `PULL`, `TLOG` and `NRT` is allowed.
184
184
185
185
`replica.location`::
186
-
One or more replica locations that are preferred.
187
-
+
188
-
A location starts with `http://hostname:port`.
189
-
Matching is done for the given string as a prefix, so it's possible to e.g., leave out the port.
190
-
+
191
-
A special value `local` may be used to denote any local replica running on the same Solr instance as the one handling the query.
186
+
Prefer replicas that match the given location. Available options are:
187
+
- `local` - Replicas in the same Solr instance as the one handling the query.
192
188
This is useful when a query requests many fields or large fields to be returned per document because it avoids moving large amounts of data over the network when it is available locally.
193
189
In addition, this feature can be useful for minimizing the impact of a problematic replica with degraded performance, as it reduces the likelihood that the degraded replica will be hit by other healthy replicas.
194
190
+
195
191
The value of `replica.location:local` diminishes as the number of shards (that have no locally-available replicas) in a collection increases because the query controller will have to direct the query to non-local replicas for most of the shards.
196
192
+
197
193
In other words, this feature is mostly useful for optimizing queries directed towards collections with a small number of shards and many replicas.
194
+
- `host` - Replicas in Solr instances running on the same host as the one handling the query.
195
+
This can be useful in many of the same ways as `local`, but can help spare network costs when multiple Solr instances are running per host.
198
196
+
199
-
Also, this option should only be used if you are load balancing requests across all nodes that host replicas for the collection you are querying, as Solr's `CloudSolrClient` will do.
197
+
As the number of shards grows, `replica.location:host` may be more useful than `replica.location:local`, since it is more likely that all shards can be found on the same host than all shards being found in the same Solr instance.
198
+
- `_host-prefix_` - A replica location starts with `http://hostname:port`, i.e. `replica.location:http://hostname:port`.
199
+
Matching is done for the given string as a prefix, so it's possible to e.g., leave out the port.
200
+
201
+
IMPORTANT: The `local` and `host` options should only be used if you are load balancing requests across all nodes that host replicas for the collection you are querying, as Solr's `CloudSolrClient` will do.
200
202
If not load-balancing, this feature can introduce a hotspot in the cluster since queries won't be evenly distributed across the cluster.
201
203
204
+
NOTE: The `local` and `host` options are equivalent when only 1 Solr node is running on each host. This is also true in a setup like Kubernetes where each Solr node has a unique hostname.
205
+
202
206
`replica.base`::
203
207
Applied after sorting by inherent replica attributes, this property defines a fallback ordering among sets of preference-equivalent replicas; if specified, only one value may be specified for this property, and it must be specified last.
* Prefer local replicas, and among them PULL replicas when available, otherwise TLOG replicas:
261
265
+
@@ -352,7 +356,7 @@ For example, the following line makes Solr use the `ExactStatsCache` implementat
352
356
353
357
The query param distrib.statsCache defaults to `true`. If set to `false`, distributed calls to fetch global term stats is turned off for this query. This can reduce overhead for queries that do not utilize distributed IDF for score calculation.
0 commit comments