€© MongoDB ®‍ç°‰©±•

  • View
    316

  • Download
    1

Embed Size (px)

Text of €© MongoDB ®‍ç°‰©±•

PowerPoint Presentation

MongoDB

Thomas BoydMongoDB

2

MongoDB

WiredTiger

{"customer_id" :123,"first_name" : John","last_name" :"Smith","address" : { "street": "123 Main Street", "city": "Houston", "state": "TX", "zip_code": "77027" }policies: [{policy_number :13,description: short term,deductible:500},{policy_number :14,description: dental,visits: []} ] }

RDBMS

MongoDB

20 /

{_id:375,en_US: { name: , description: , },en_GB: { name: , description: , },fr_FR: { name: , description: , },fr_CA: { name: , description: , },de_DE: ,}

db.catalog.find( { _id: 375 }, { en_US: true } );db.catalog.find( { _id: 375 }, { fr_FR: true } );db.catalog.find( { _id: 375 }, { de_DE: true } );

{_id:375,en_US: { name: , description: , },en_GB: { name: , description: , },fr_FR: { name: , description: , },fr_CA: { name: , description: , },de_DE: ,de_CH: ,}

{_id:42,en_US: { name: , description: , },en_GB: { name: , description: , },fr_FR: { name: , description: , },fr_CA: { name: , description: , },de_DE: ,de_CH: ,}

20 RAM IO {_id:"375-en_GB",name: ,description: , }

MongoDB

2 Robertston 1

6 rules of thumb 1 http://goo.gl/TFJ3dr 2 http://goo.gl/qTdGhP 3 http://goo.gl/JFO1pI

B

.explain()mtoolsystem.profile

mongod Sun Jun 29 06:35:37.646 [conn2] query test.docs query: { parent.company:"22794", parent.employeeId:"83881" } ntoreturn:1 ntoskip:0 nscanned:806381 keyUpdates:0 numYields: 5 locks(micros) r:2145254 nreturned:0 reslen:20 1156ms

mtoolhttp://github.com/rueckstiess/mtools 6 6 1000 mlogfilter mongodb.log --from 06:00 --to 18:00 --slow 1000 > mongodb-filtered.log

db.collection.ensureIndex({A:1, B:1, C:1})db.getSiblingDB("admin").runCommand( { setParameter: 1, notablescan: 1 } )

/

MongoDB Management Service (MMS)

MMS

MMS

MMS http://mms.mongodb.com Web

WiredTiger

7 10 50% 80% WiredTiger

MongoDB 3.0MongoDB 2.6

27

RAMCPU

10% 100%

4

/ mongos

mongod

/ mongos

16 mongod

SSD IOPS

/ mongos

mongod

SSD

.... ulimitsswapNUMANOOP IO ext4 XFS SANRAID10readaheadnoatime MongoDB

1 2 3 N

mongod

/0..100

/

mongod

mongod0..5051..100

mongod

mongod

mongod

mongod0..2526..5051..7576..100

/

_id 1mongos 2 3 N

[ ISODate(), $maxKey )

MongoDB Management Service (MMS) SLA

MMS []

MMS MongoDB MongoDB MMS SLA SLA44

MMS - 12

150 Oplog 10-180 100

MMS

45

MMS

/ / Oplog AWS MongoDB

MonoDB

2.5 /30 /

50 /1400 1000 250

130

http://www.mongodb.com/mongodb-scale48