This document discusses MercadoLibre's use of MongoDB. It provides an overview of MeLi's platform which receives 20 million requests per minute. It then discusses why MongoDB was chosen, highlighting its capabilities for horizontal scaling, high availability, performance and flexible data. Several use cases at MeLi are described such as storing social, orders, feedback and item data. Lessons learned are shared around storage, virtual machines, monitoring and planning actions. The document concludes that MeLi loves using MongoDB.
1 of 29
Download to read offline
More Related Content
MongoDB at MercadoLibre
1. MongoDB
At MercadoLibre
Wh at h ave we le a rned
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