Diagram
A client writes timestamped documents to a Firestore instruments collection. An unsharded index keyed only on timestamp packs all index entries into one tablet, creating a 500 writes-per-second hot spot, while a sharded composite index (shard DESC, then filter field, then timestamp DESC) spreads index entries across multiple tablets on different Firestore servers, deployed with firebase deploy --only firestore:indexes.
Balancing Read Performance Against Sequential Write Hot Spots
A write hot spot is a performance tradeoff created when sequential indexed values prevent Firestore from scaling index writes. For each index write, Firestore defines a key-value entry that concatenates the document name and the value of each indexed field. Firestore organizes these index entries into groups of data called tablets, and each Firestore server holds one or more tablets. When write load to a tablet becomes too high, Firestore scales horizontally by splitting the tablet into smaller tablets and spreading the new tablets across different Firestore servers.
Domain 1 of 5
21 practice questions
Practice this DomainLast updated