On our search pages we have a main request where we really want to give the
correct answer, but we also have a number of other child searches performed
on that page where we're happy to get 90% of the way there and be able to
enforce an SLA.

Right now, when the main search finishes we have to completely cancel the
other searches if they haven't returned. We'd prefer to give them a max
timeAllowed and take whatever results are back. Without any timeouts, we
would end up waiting for the slowest shard of all of the requests before
returning results to the user.


On Fri, May 30, 2014 at 6:09 PM, Jason Hellman <
jhell...@innoventsolutions.com> wrote:

> Gregg,
>
> I don’t have an answer to your question but I’m very curious what use case
> you have that permits such arbitrary partial-results.  Is it just an edge
> case or do you want to permit a common occurrence?
>
> Jason
>
> On May 30, 2014, at 3:05 PM, Gregg Donovan <gregg...@gmail.com> wrote:
>
> > I'd like a to add a hard timeout on some of my sharded requests. E.g.:
> for
> > about 30% of the requests, I want to wait no longer than 120ms before a
> > response comes back, but aggregating results from as many shards as
> > possible in that 120ms.
> >
> > My first attempt was to use timeAllowed=120&shards.tolerant=true. This
> sort
> > of works, in that I'll see partial results occasionally, but slow shards
> > will still take much longer than my timeout to return, sometimes up to
> > 700ms. I imagine if the CPU is busy or the node is GC-ing that it won't
> be
> > able to enforce the timeAllowed and return.
> >
> > Is there a way to enforce this timeout without failing the request
> > entirely? I'd still like to get as many shards to return in 120ms as I
> can,
> > even if they have partialResults.
> >
> > Thanks.
> >
> > --Gregg
>
>

Reply via email to