13. Use Cases
DB Documents
Social +700M
Orders +23M
Feedback +3M
Emails +61M
Items +200M
Logging +332M
14. Use Case: Social
Store Meli’s users social data
LOT of data (friends, likes, ...)
> 500 Gb
> 700 M documents
12 shards servers : 4 replica set
Each replica set = 3 servers
80Gb per instance
15. Use Case: Social
Sp
ec
@T ial
ioB thk
or st
Store Meli’s users social data rac o
ho
LOT of data (friends, likes, ...)
> 500 Gb
> 700 M documents
12 shards servers : 4 replica set
Each replica set = 3 servers
80Gb per instance
21. Use Case: Logging
Capped Collections!
Info logs
RabbitMQ messages
Track certain use cases
Errors logs
Something bad happen...
Recuperable errors with retry handler
22. Lessons Learned
Storage
File System
NSF: Bad choice, Poor results
Ext4: Far much better
Mount Options
Reducing Disk IO by mounting partitions with noatime and nodiratime
Track disk performance
iostat -xm 2 (%util column < 100%)
23. Lessons Learned
VM’s
Shard instances
4 cores
>= 16 Gb ram
Config server
low cpu consumption
1Gb ram / 1Gb storage
Mongos
runs along with the webserver (client)
1 mongos x webserver
24. Lessons Learned
Monitoring
Disk usage (with zenoss)
Ping health check
curl --connect-timeout 3
--write-out %{http_code}
--silent
--output /dev/null
http://localhost:28017/_status
29. The End
Questions?
{
name : "Pablo Molnar",
title : "Software Engineer",
work : "MercadoLibre",
location : "Buenos Aires",
twitter : "@pablomolnar"
}