This document discusses how Banjo, a location-based social discovery app, uses MongoDB to store and query geo-tagged social media posts in real-time. Key points:
- Banjo aggregates posts from Facebook, Twitter, Instagram and Foursquare to show users nearby social activity. It stores over 50 billion connections and receives 200 posts per second.
- Posts are stored in MongoDB with fields like ID, username, text, coordinates and friend IDs. Geospatial indexes on coordinates allow querying for nearby posts.
- Techniques like pre-sharding large friend arrays and switching from capped to TTL collections help optimize performance of queries involving friends and expiration of old posts.