lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Nithian <>
Subject Re: ping query frequency
Date Sun, 03 Mar 2013 20:53:03 GMT
We too run a ping every 5 seconds and I think the concurrent Mark/Sweep
helps to avoid the LB from taking a box out of rotation due to long pauses.
Either that or I don't see large enough pauses for my LB to take it out
(it'd have to fail 3 times in a row or 15 seconds total before it's gone).

The ping query does execute an actual query so of course you want to make
this as simple as possible (i.e. q=<primary_key>:<value>) so that there's
limited to no scanning of the index. I think our query does an id:0 which
would always return 0 docs but also any stupid-simple query is fine so long
as it hits the caches on subsequent hits. The goal, to me at least, is not
that the ping query yields actual docs but that it's a mechanism to remove
a solr server out of rotation without having to login to an "ops
controlled" device directly.

I'd definitely remove the ping per request (wouldn't the fact that you are
doing /select serve as the "ping" and hence defeat the purpose of the ping
query) and definitely do the frequent ping as we are describing if you want
to have your solr boxes behind some load balancer.

On Sun, Mar 3, 2013 at 8:21 AM, Shawn Heisey <> wrote:

> On 3/3/2013 2:15 AM, adm1n wrote:
>> I'm wonderring how frequent this query should be made. Currently it is
>> done
>> before each select request (some very old legacy). I googled a little and
>> found out that it is bad practice and has performance impact. So the
>> question is should I completely remove it or just do it once in some
>> period
>> of time.
> Can you point me at the place where it says that it's bad practice to do
> frequent pings?  I use the ping functionality in my haproxy load balancer
> that sits in front of Solr.  It executes a ping request against all my Solr
> instances every five seconds.  Most of the time, the ping request (which is
> distributed) finishes in single-digit milliseconds. If that is considered
> bad practice, I want to figure out why and submit issues to get the problem
> fixed.
> I can imagine that sending a ping before every query would be a bad idea,
> but I am hoping that the way I'm using it is OK.
> The only problem with ping requests that I have ever noticed was caused by
> long garbage collection pauses on my 8GB Solr heap.  Those pauses caused
> the load balancer to incorrectly mark the active Solr instance(s) as down
> and send requests to a backup.
> Through experimentation with -XX memory tuning options, I have now
> eliminated the GC pause problem.  For machines running Solr 4.2-SNAPSHOT, I
> have reduced the heap to 6GB, the 3.5.0 machines are still running with 8GB.
> Thanks,
> Shawn

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message