Skip to content

Instantly share code, notes, and snippets.

@visnup
Created November 9, 2010 00:23
Show Gist options
  • Save visnup/668523 to your computer and use it in GitHub Desktop.
Save visnup/668523 to your computer and use it in GitHub Desktop.
mongodb lightning talk

MONITAUR IS

instant, real-time server monitoring. written during rails rumble 2010. [show website] [<1 minute walkthrough]

MONITAUR USES

  • rails 3 - mongoid - http://mongoid.org

  • node.js - node-mongodb-native - https://github.com/christkv/node-mongodb-native

    • ssh
  • redis - communication between the two

  • MONGODB

    • 1 sample every 5 seconds (12 samples / minute) * every metric * every server
    • = 172,800 samples / day / server (10 metrics)
    • = easily 1 million samples within first 12 hours (10 servers)

GOTCHAS

OMG: all of these things became important in the last hour (and beyond) of rails rumble:

  • use 64-bit if you don't know the difference

    • new user signups just stopped working even though saying inserts were ok
    • 32-bit db size is limited to 4GB (= small)
  • capped collections

    • linode disk limited (we're cheap)
    • fast writes (which we throw out because we need to index it)
    • blow away /var/mongodb - it's ok!
    • account for indexes when specifying capped size
  • mongorestore

    • build indexes last
    • BUG: mongorestore on osx doesn't bring in indexes
@gerad
Copy link

gerad commented Nov 14, 2010

looks good...
might be good to demo setting up a new server because it's so easy

did you omit comments about indexes and capped collections intentionally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment