API DesignSharding Status for failure scenarios

time to read 1 min | 187 words

An interesting question came up recently. How do we want to handle sharding failures?

For example, let us say that I have a 3 nodes clusters of RavenDB, serving posts for a blog (just to give some random example). The way the sharding has been setup, we are doing sharding using Round Robin based on posts (so each post goes to a different machine, and anything related to post goes to the same node as the post). Here is how it can be set:

image

Now, we want to display the main page, and we would like to show the most recent posts. We can do this using the following code:

image

The question is, what would happen if the second server if offline?

I’ll give several alternative in the next few posts.

More posts in "API Design" series:

  1. (04 Dec 2017) The lack of a method was intentional forethought
  2. (27 Jul 2016) robust error handling and recovery
  3. (20 Jul 2015) We’ll let the users sort it out
  4. (17 Jul 2015) Small modifications over a network
  5. (01 Jun 2012) Sharding Status for failure scenarios–Solving at the right granularity
  6. (31 May 2012) Sharding Status for failure scenarios–explicit failure management doesn’t work
  7. (30 May 2012) Sharding Status for failure scenarios–explicit failure management
  8. (29 May 2012) Sharding Status for failure scenarios–ignore and move on
  9. (28 May 2012) Sharding Status for failure scenarios