[ 
https://issues.apache.org/jira/browse/SOLR-6832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14245538#comment-14245538
 ] 

Shawn Heisey commented on SOLR-6832:
------------------------------------

That sounds like a perfect use-case for this option.  In your setup, you have 
an external load balancer and are not relying on SolrCloud itself or the 
zookeeper-aware Java client (CloudSolrServer) to do the load balancing for you. 
 For an environment like that, letting SolrCloud forward the request adds a 
completely unnecessary network hop, along with new Java objects and subsequent 
garbage that must be collected.

This is why I said I didn't want to derail the work.  If you have a solution, 
we should try to get it to a state where it can be committed.  It is very clear 
that it will be an immense help for many users.  I just don't want it to become 
the default.

Trying to come up with a useful and descriptive option name that's not horribly 
long ... that's a challenge. :)  Something like handleRequestsLocally may be 
too generic, but it's a lot shorter than handleShardRequestsLocallyIfPossible!


> Queries be served locally rather than being forwarded to another replica
> ------------------------------------------------------------------------
>
>                 Key: SOLR-6832
>                 URL: https://issues.apache.org/jira/browse/SOLR-6832
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.10.2
>            Reporter: Sachin Goyal
>
> Currently, I see that code flow for a query in SolrCloud is as follows:
> For distributed query:
> SolrCore -> SearchHandler.handleRequestBody() -> HttpShardHandler.submit()
> For non-distributed query:
> SolrCore -> SearchHandler.handleRequestBody() -> QueryComponent.process()
> \\
> \\
> \\
> For a distributed query, the request is always sent to all the shards even if 
> the originating SolrCore (handling the original distributed query) is a 
> replica of one of the shards.
> If the original Solr-Core can check itself before sending http requests for 
> any shard, we can probably save some network hopping and gain some 
> performance.
> \\
> \\
> We can change SearchHandler.handleRequestBody() or HttpShardHandler.submit() 
> to fix this behavior (most likely the former and not the latter).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to