Are contents of a bucket held in the same shard?

We are evaluating using buckets to keep data by user account in a single bucket (e.g. the bucket becomes the "accountid" container, holding all documents for that account)

The question has arisen: If we have a 20 or 100 shard index, will a given bucket always be kept within a single shard?

If not, how many shards will it span?

Yes. All data for a given account will go to one single shard.

David,

Does that mean that a bucket + shards + routing will:

  • give me control over which shard an account lives on
  • give me more ES performance on queries, since, in all architectres, I will always have multiple accounts per shard

?

Yes.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.