To me it looks like it defaults to 10000 max connections per route 
<https://github.com/apache/lucene-solr/blob/branch_8_11/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java#L298>
 in 8.11?
And you can override that if you provide your custom HttpClient using 
Builder.withHttpClient(httpClient) 
<https://github.com/apache/lucene-solr/blob/branch_8_11/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientBuilder.java#L36>.

PS: It may be possible to use latest 8.11.1 SolrJ in your app even if Solr 
server side is an earlier 8.x version.

Jan


> 30. mai 2022 kl. 15:06 skrev Shawn Heisey <[email protected]>:
> 
> On 5/30/2022 12:30 AM, Clemens WYSS (Helbling Technik) wrote:
>> As you can see
>> * we keep one SolrClient-connection per core in a map and make use of these 
>> connections
>> * making use of HttpSolrClient ( Http2SolrClient is denoted "experimental" 
>> and has cause some problem )
>> * no special tweaking of underneath HttpClient
>> 
>> Any reason for this minimal setup not being able to stem many many 
>> concurrent requests? What is the proposed SolrJ based solr client setup (for 
>> a single Solr server)?
> 
> Vincenzo is correct.  Used properly, the solr clients are thread-safe and 
> designed to handle concurrent connections.
> 
> You actually only need one HttpSolrClient per Solr instance (host/port 
> combination), not one for every core.  When you make a request to Solr via a 
> SolrClient, you can tell it what core/collection should receive the request.  
> As long as the number of cores isn't enormous, having a client per core is 
> not likely to cause issues.  Just something for you to think about the next 
> time you are ready to do a major code revision.
> 
> What version of SolrJ are you using in your code?  For a long time, SolrJ 
> defaulted to an HttpClient that only allowed two threads per destination.  
> Then that was greatly increased.  Now from what I can decipher in current 8.x 
> code using the Builder, we may be back to a default of two connections per 
> destination, which is NOT a good thing when concurrency is expected.
> 
> Looking at HttpSolrClientBuilder, I do not see a way to specify a custom http 
> client.  Anyone know how that can be done?
> 
> Thanks,
> Shawn
> 

Reply via email to