YUNOVA · Firebase
Module 12: Scaling and cost
Firestore data modelling for scale
Key points
- Model data around the queries your screens need.
- Duplicating some data is normal in Firestore to avoid extra reads.
- Use subcollections for large lists instead of growing one document.
Controlling cost and budgets on the Blaze plan
Key points
- The Blaze plan charges for usage above the free limits.
- Set budget alerts in Google Cloud billing to get warned early.
- Avoid unbounded listeners and loops that cause runaway reads.
Exporting Firebase Analytics to BigQuery
Key points
- Linking Firebase to BigQuery exports raw Analytics events daily.
- You can query the events with SQL for custom reports.
- Streaming export gives near real-time data but costs more.
Firebase Admin SDK on a server
Key points
- The Admin SDK gives a trusted server full access to Firebase services.
- It bypasses security rules, so keep its credentials secret.
- Use it for tasks like verifying ID tokens or setting custom claims.