Ad

Firestore DB In Native Mode Document Write Limit

Firestore database in Native mode has a limit of 1 "write" per document per second (https://firebase.google.com/docs/firestore/quotas#writes_and_transactions).

Does a document delete count as a write operation? i.e. if within a second we created a new document & then deleted it would we run into issues due to this limit?

In the billing documentation it talks about reads, writes & deletes making it sound as though a write and delete are separate types of operations (https://firebase.google.com/docs/firestore/pricing#operations).

Ad

Answer

Deletes do count as writes. The write limit is about sustained load -- if you have a small burst of > 1/sec it's fine, but sustained > 1/sec will cause problems.

Quoted from a Google Firebase developer on Twitter: https://twitter.com/mbleigh/status/1158411267284934657

I have carried out a load test of 10,000 document creates followed by deletes in series over 400s (avg. 40ms per create -> delete) and noticed no impact (no errors or extra latency).

Ad
source: stackoverflow.com
Ad