Hi Marcus,

The node handling the request only queries the nodes with shard copies of
that database. In a 100 node cluster the shards for that particular
database might be present on only 6 nodes, depending on the Q and N
sharding factors, so it will query 6 out 100 nodes. For instance, for N=3
and Q=2 sharding factors, it will first send N*Q=6 requests, and wait until
it gets at least one response for each of the Q=2 shard ranges. This
happens very quickly. Then, for the duration of the response, it will only
stream responses from those Q=2 workers. So, to summarize for a Q=2
database, it will be a streaming response from 2 workers. For Q=4, from 4
workers, etc...

Cheers,
-Nick


On Wed, Jun 12, 2024 at 1:00 PM Markus Doppelbauer
<[email protected]> wrote:

> Hello,
>
> Is the CouchDB-view a "global" or "local" index?
> For example, if a cluster has 100 nodes, would the query ask
> for a single node - or 100 nodes?
>
> /.../_view/posts?startkey="foobar"&endkey="foobaz"
>
> Best wishes
> Marcus
>
>

Reply via email to