MongoDB Best Practices...
Nice article by the EngineYard team regarding MongoDB best practices.
Its actually a two-part article, first getting into general NoSQL, and then specifically into MongoDB.
The NoSQL part is (as you might expect) somewhat general (I've got my own general contribution here), but I love the understatement in the point about EBS
Anyhow, the rest of the article is really quite relevant - somewhat obvious, but still extremely relevant. It may read like a 'best-hits' list of the comments from the Don't Use MongoDB flame-war a wee bit back, but if you weren't part of that, well, read this. In particular, I'd like to emphasize
Its actually a two-part article, first getting into general NoSQL, and then specifically into MongoDB.
The NoSQL part is (as you might expect) somewhat general (I've got my own general contribution here), but I love the understatement in the point about EBS
you should know that the performance of Amazon’s Elastic Block Storage (EBS) can be inconsistent.Indeed! I'd actually take it a step further and say Do not use EBS in any environment where reliability and/or performance characteristics of your disk-access are important. Or, to put it differently, asynchronous backups - OK, disk-based databases - Not So Much.
Anyhow, the rest of the article is really quite relevant - somewhat obvious, but still extremely relevant. It may read like a 'best-hits' list of the comments from the Don't Use MongoDB flame-war a wee bit back, but if you weren't part of that, well, read this. In particular, I'd like to emphasize
- Keep current with versions : If you are a CouchDB migrant, this might come as a bit of a shock to you, but MongoDB lives much more on the bleeding edge than you might be used to. Things seem to be (kinda, sorta) settling down, but still...
- Keep your working set in memory : This is extremely relevant if you are on AWS (and you probably are) - remember, EBS is not your friend...
- Be very, very, very careful when sharding : The best (worst?) for last. Sharding is, at the best of times, extremely application and context dependant. With MongoDB, certain operations - like switching sharding keys - can be righteously painful and lead to ulcers and/or permanent loss of sleep. My personal recommendation is to avoid sharding if at all possible. If you have to, well, try and avoid it anyhow :-)
- You didn't understand your own problem-space as well as you thought you did.
- You didn't understand the package that you are using as well as you think you do.
- It will not scale the way you thought it would. Oh, it'll scale all right, just not the way you thought it would.
- Your object/document/JSON/whatever model really doesn't map exactly the way you expected it to.
Comments
mongodb online training India
mongodb online training Hyderabad