Firestore is Google's managed NoSQL thing. Instead of spending 3 weeks setting up MongoDB sharding like some masochist, Firestore just handles the scaling shit for you. You store JSON documents in collections, query them with a decent (but limited) API, and get real-time updates across all your clients. The official documentation covers the basics well enough.
How This Thing Works
You dump JSON into documents, organize them in collections. It's like folders but you can nest shit infinitely with subcollections. 1MB per document sounds huge until you store user activity logs and suddenly hit the wall. Happened to us when we tried logging every click. The data model guide explains the structure better than most.
Pick Native mode. Datastore mode is legacy garbage - don't go there unless some ancient codebase is forcing your hand.
The Good Parts
Real-time Sync: Change a doc, everyone sees it instantly. Actually works great for chat apps. Snapshot listeners are solid but they'll murder your read quota if you have lots of users.
Offline Mode: Mobile SDKs cache stuff locally. Works offline, syncs when back online. Mostly. Conflict resolution is "last writer wins" which is fine until you need something smarter.
Auto-scaling: Scales without asking, bills without warning. Handles traffic spikes but individual docs max out at 1 write/sec (soft limit). Exceed it and you get ABORTED
errors. Found this out when our vote counter broke during launch day.
Security Rules: Control access with JavaScript-like rules. Powerful when they work, hell when they don't. The rules simulator catches maybe 60% of issues. The other 40% break at 2am. Check out these common security patterns if you're stuck.
MongoDB Compatibility (Finally!)
Google added MongoDB compatibility to Firestore Enterprise (v2.1.0). Use MongoDB drivers with Firestore infrastructure - sounds awesome until you actually migrate. Complex aggregations break, pipelines shit the bed, and I spent 3 weeks on what should've been a weekend project. Half our MongoDB 4.4 stuff didn't translate. The compatibility layer chokes on MongoDB 6.0+ syntax.
Worth noting: This isn't a silver bullet for MongoDB refugees. It's more like a bridge that helps some queries work while you refactor your data model. Your existing aggregation pipelines will need rebuilding, and forget about transactions spanning multiple collections. Still beats rewriting everything from scratch, but don't expect plug-and-play compatibility.
Performance (It's Complicated)
Simple queries are fast - single doc reads under 10ms. Complex queries? Slow as fuck and you can't optimize them. Query Explain helps debug slow shit when it actually works.
Read the best practices or suffer. Ignore them and you'll create hotspots that murder performance. The 1-write-per-second limit is real - seen apps break with ABORTED: too much contention on these documents
when trying to increment counters fast. Scaling guide covers the painful gotchas.
What Works With It
Works nicely with other Google stuff. BigQuery exports for analytics, Cloud Functions trigger on changes. Firebase Auth handles users without OAuth hell.
Firebase ecosystem is solid for smaller apps. But watch your fucking costs - pay-per-operation looks innocent until reality hits. Our bill jumped $50 to $500 overnight when we hit the front page of HN. Nobody mentioned real-time listeners multiply read costs.
Bottom line: Firestore works great when it works. The real-time sync is legitimately impressive, the mobile SDKs are solid, and the auto-scaling mostly delivers. But the pricing model will bite you, the query limitations will frustrate you, and the debugging experience will make you question your life choices. It's still better than managing your own MongoDB cluster, but that's a pretty low bar these days.