Skip to content

Instantly share code, notes, and snippets.

@mbj
Created December 7, 2011 22:34
Show Gist options
  • Save mbj/1445040 to your computer and use it in GitHub Desktop.
Save mbj/1445040 to your computer and use it in GitHub Desktop.
Our company rules to run batch jobs on a mongodb replica set
Steps before running a batch job on any production mongo cluster:
#1 If you are not the operator, ask him before.
#2 Test the batch on a copy of the dataset before. If the dataset is big, make a representational slice.
#3 Ensure you have a recent backup (or a write behind slave). Bad batches can destroy the company.
#4 Run the batch on "low traffic" times.
#5 Ensure you limit the batch rate using consistent writes to at least one slave.
#6 Notify support, staff, and all possible related personnel before and after the batch.
#7 If you cause any problem, add a solution rule to this document.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment