Skip to content

Instantly share code, notes, and snippets.

@hyrmn
Last active June 22, 2016 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyrmn/bcef080e04b4126d63c333427a03e255 to your computer and use it in GitHub Desktop.
Save hyrmn/bcef080e04b4126d63c333427a03e255 to your computer and use it in GitHub Desktop.
Raven 2.5 with 500 tenants on several nodes.

The bullet points for 500 tenants on 2.5:

  • Automate tenant creation across all nodes
  • Active-active read/write. Let Raven handle syncing behind the scenes; it's good at this
  • More RAM is better than less RAM
  • Understand how your hosting infra affects Raven. We had to write custom failover code because of all of the virtual layers on Azure (we host on Azure VMs) (https://gist.github.com/hyrmn/7262c3d7450793550e48)
  • Expect replication to randomly not be set up even if it tells you it succeeded. Have logging for this (we have Raven logging to Seq)
  • Pre-stage indexes. Use an index naming scheme to support this (eg, PeopleSearch changes get deployed as PeopleSearch2). This means you should never reference an index by string. RavenDB 3.x with side-by-side indexes address this I think
  • Running is fine but server restarts are slow and messy. Block client traffic to the node and let clients failover to other node(s)
  • Multi-tenant on Raven is incredibly straightforward; use it to isolate at appropriate bounded contexts
  • Write tooling to sanity check your databases across nodes. We compare doc counts and flag any that are significantly off
  • Ditto checking indexes. I've seen non-stale indexes differ by several thousand documents across nodes. Forcing a change to the index def (eg, add a space and save) will fix
  • If you're on Azure, assume the networking layers will occasionally interrupt your writes. We use Polly to address this https://gist.github.com/hyrmn/02782bfdc465f434ea25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment