Firebase Realtime Database has limits on simultaneous connections per database. What is the main reason to use sharding (splitting data across multiple databases)?
Think about connection limits and how splitting data helps.
Sharding splits data across multiple databases, allowing more simultaneous connections and better scaling. It does not reduce data size or simplify schema directly.
Firebase Cloud Functions run backend code in response to events. How does this pattern help solve scaling problems?
Consider how serverless functions handle traffic changes.
Cloud Functions automatically scale with demand, so developers don't manage servers. This helps apps handle varying loads smoothly.
Firebase security rules control data access. How can writing very granular rules affect app scaling?
Think about how complex rules affect request processing time.
More detailed rules mean more checks per request, which can slow down responses and affect scaling under heavy load.
Firebase encourages denormalizing data (duplicating data in multiple places). How does this pattern help with scaling?
Think about how many times the app reads data during use.
Denormalization duplicates data to reduce complex joins and multiple reads, which improves read performance and scales better.
Firestore limits writes to a single document to 1 per second. What is the expected behavior if an app tries to write faster to the same document?
Consider Firestore's write rate limits and error handling.
Firestore enforces write limits per document. Excess writes cause errors, requiring the app to retry or redesign data structure.