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