Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Real time, high performance big data - Ubuntu Enterprise Summit

Real time, high performance big data - Ubuntu Enterprise Summit

How Server Density built an infrastructure for handling high volume, real time data analysis, using high availability cloud and dedicated Ubuntu instances.

Presented by David Mytton at Ubuntu Enterprise Summit 2012

Server Density

October 30, 2012
Tweet

More Decks by Server Density

Other Decks in Technology

Transcript

  1. •MySQL -> MongoDB •15TB data per month •27 nodes MongoDB

    at Server Density • June 2009 - +3yrs
  2. Fast out of the box? Photo: dannychoo.com • Local instance

    storage • Softlayer cloud (1 core, 8GB)
  3. Fast out of the box? Photo: dannychoo.com • Local instance

    storage • Ubuntu 10.04 LTS • Softlayer cloud (1 core, 8GB)
  4. Picture is unrelated! Mmm, ice cream. Fast out of the

    box? • Fast network • Working set in RAM
  5. mongos> db.metrics_20120508_15_1m.stats() { "sharded" : true, "flags" : 1, "ns"

    : "metrics.metrics_20120508_15_1m", "count" : 2752934, "numExtents" : 46, "size" : 746837640, "storageSize" : 823717888, "totalIndexSize" : 517581680, "indexSizes" : { "_id_" : 130358144, "a_1_i_1" : 155711920, "a_1_i_1_m_1_t_1" : 231511616 }, "avgObjSize" : 271.2878841265355, "nindexes" : 3, "nchunks" : 61,
  6. How you’ll know 1) Slow queries Thu Oct 14 17:01:11

    [conn7410] update sd.apiLog query: { c: "android/setDeviceToken", a: 1466, u: "blah", ua: "Server Density Android" } 51926ms www.flickr.com/photos/tonivc/2283676770/
  7. Picture is unrelated! Mmm, ice cream. Fast out of the

    box? • Fast network • Working set in RAM
  8. Picture is unrelated! Mmm, ice cream. Fast out of the

    box? • Fast network • Working set in RAM • Fast disks (optional)
  9. Picture is unrelated! Mmm, ice cream. Fast out of the

    box? • Fast network • Working set in RAM • Fast disks (optional)
  10. Picture is unrelated! Mmm, ice cream. Fast out of the

    box? • Fast network • Working set in RAM • Fast disks (optional) • Sharding (optional)
  11. Tags { _id : "someSet", members : [ {_id :

    0, host : "A", tags : {"dc": "ny"}}, {_id : 1, host : "B", tags : {"dc": "ny"}}, {_id : 2, host : "C", tags : {"dc": "sf"}}, {_id : 3, host : "D", tags : {"dc": "sf"}}, {_id : 4, host : "E", tags : {"dc": "cloud"}} ] settings : { getLastErrorModes : { veryImportant : {"dc" : 3}, sortOfImportant : {"dc" : 2} } } } > db.foo.insert({x:1}) > db.runCommand({getLastError : 1, w : "veryImportant"})
  12. { _id : "someSet", members : [ {_id : 0,

    host : "A", tags : {"dc": "ny"}}, {_id : 1, host : "B", tags : {"dc": "ny"}}, {_id : 2, host : "C", tags : {"dc": "sf"}}, {_id : 3, host : "D", tags : {"dc": "sf"}}, {_id : 4, host : "E", tags : {"dc": "cloud"}} ] settings : { getLastErrorModes : { veryImportant : {"dc" : 3}, sortOfImportant : {"dc" : 2} } } } > db.foo.insert({x:1}) > db.runCommand({getLastError : 1, w : "veryImportant"}) (A or B) + (C or D) + E Tags
  13. { _id : "someSet", members : [ {_id : 0,

    host : "A", tags : {"dc": "ny"}}, {_id : 1, host : "B", tags : {"dc": "ny"}}, {_id : 2, host : "C", tags : {"dc": "sf"}}, {_id : 3, host : "D", tags : {"dc": "sf"}}, {_id : 4, host : "E", tags : {"dc": "cloud"}} ] settings : { getLastErrorModes : { veryImportant : {"dc" : 3}, sortOfImportant : {"dc" : 2} } } } > db.foo.insert({x:1}) > db.runCommand({getLastError : 1, w : "sortOfImportant"}) (A + C) or (D + E) ... Tags
  14. Picture is unrelated! Mmm, ice cream. Fast out of the

    box? • Fast network • Working set in RAM
  15. Picture is unrelated! Mmm, ice cream. Fast out of the

    box? • Fast network • Working set in RAM • bit.ly/benchrun