Андрей Годин - Базы данных: Документоориентированная...
Transcript of Андрей Годин - Базы данных: Документоориентированная...
3
Mongodb, UGC project
-‐ billions objects; -‐ terabytes of data MongoDB; -‐ high Disk I/O; -‐ big size Indexes -‐ balancing & connec?ons to DB; -‐ troubleshoo?ng mongodb;
9
диск
Notes: -‐ write global lock to DB; -‐ no transac?ons; -‐ single threaded chunk moving job; -‐ 20000 connec?ons limit to mongod/mongos; -‐ Mongos unable to work in RO mode; -‐ no connec?on-‐pool
16
Clean hidden and Startup:
Secondary
Secondary
Secondary hidden
Primary
ReplicaSet:
Startup
UP
UP
UP
17
Recover Secondary:
Secondary
Secondary
Secondary hidden
Primary
ReplicaSet:
DOWN
DOWN
UP
UP
rsync
18
Chunk-‐defrag RS:
Secondary
Secondary
Secondary hidden
Primary
ReplicaSet:
UP UP
UP
Defrag UP
Defrag UP delay
19
Recover Secondary:
Secondary Secondary
Secondary hidden
Primary
ReplicaSet:
DOWN
DOWN
UP
Defrag UP
rsync
20
Usual RS:
Secondary
Secondary
Secondary hidden
Primary
ReplicaSet:
UP UP UP defrag
UP defrag
UP defrag
22
Monitoring:
-‐ db.serverStatus() -‐ rs-‐indexes-‐consistency -‐ indexes-‐miss-‐ra?o -‐ backgroundFlushing -‐ heap_usage_bytes -‐ connec?ons -‐ replica?on -‐ qr|qw