3
votes

I am running a cloud function whenever a firestore document is updated. The function reads the document, gets the user IDs and then takes the user token IDs from the realtime db and sends notification. So we have 1 document read here and some download overhead associated with the reads on the realtime db. My question is :

  1. If cloud functions reads a node of the realtime db, will the downloads (for the read on the realtime db) be billable?

  2. If cloud functions reads a document of firestore, will the document read be billable?

1

1 Answers

2
votes

According to the links below, all reads and writes are billable (or count toward reading count), even in cases of evaluating security rules, so Cloud functions should also be "billable".

  1. According to Understand Realtime Database Billing,

    All traffic to and from your database, including operations denied by security rules, leads to billable costs.

  2. According to Cloud Firestore Pricing,

    You are charged for each document read, write, and delete that you perform with Cloud Firestore.