With Firebase Data Connect now in public preview, you might be wondering how pricing works for it. At a high level, Data Connect consists of two billable components: the Data Connect service itself, and the PostgreSQL instance on Cloud SQL that contains your project data. In addition, if you use vector embeddings in your schema, you will be billed for Vertex AI as well.
Data Connect is entirely no-cost during Public Preview (PP), and 3 months after General Availability (GA), there will be permanent costs as low as $9.37 per month that follows Google Cloud pricing for the PostgreSQL instance on Cloud SQL.
In this post, we’ll explore the two billable components of Data Connect and how these costs will change between PP and GA.
Pricing for Data Connect service
The Data Connect service pricing consists of two parts: network egress and operation count.
Network Egress: Data Connect Service
The Data Connect service has no cost for network egress during PP. After GA, there is no cost up to 10 GiB/month, and then it will follow Google Cloud Internet Data Transfer Rate Premium Tier pricing.
The amount of data transferred out of the database is going to incur costs for the Data Connect service, and the cost will depend on the location of your database and the destination of the response. All data transferred to the database (i.e., data ingress) is free. There are no other associated costs with regards to network egress for the Data Connect service.
Network Egress: Potential Additional Costs
Google Cloud pricing kicks in after GA for the Cloud SQL for PostgreSQL instance, and on that pricing page, there is a section for network egress.
The good news is network egress is only charged once for data going out of your database. When you call the Data Connect service, that service calls Cloud SQL as in internal call and Cloud SQL will not generate any network egress costs.
That being said, there might be inter-region costs as a result of transferring data to Cloud SQL cross-region replicas. However, this is unlikely with a single database, because your replicas are going to be created in the same region unless you select otherwise.
You may also receive an additional network egress call if you call Cloud SQL directly, and an example of this is running data analytics that isn’t day-to-day application logic. This means you might see:
- Data Connect egress charges for your regular Data Connect usage as described above, and
- Cloud SQL egress charges for your non-Data Connect usage Therefore, you may see both Data Connect and CloudSQL network egress charges within a month for data transfering out, but that means you called both services.
Operation Count
Queries and mutations are billable operations, and during Public Preview, there is no cost for these. After General Availability, there is no cost up to 250k operations per month, and then the cost will be $4.00 per 1M operations.
$4 per 1M operations sounds like a hefty cost (perhaps compared to the charges from Firebase Firestore). But, Data Connect operations and Firestore access to documents are very different. One Data Connect operation can retrieve many records of data, while one document read gets one document which is comparable to one record. In a query or mutation with Data Connect, you can get an entire database’s worth of data (or even more with joins), and this is just one operation (although getting too much data might cost more in network egress). To accomplish the same in Firestore, you would need the number of reads or writes equal to however many records there are in the database.
Pricing for PostgreSQL instance on Cloud SQL
There will be costs associated with your PostgreSQL instance on Cloud SQL. For the sake of simplicity in this section, we’ll use “your instance” to stand for “your PostgreSQL instance on Cloud SQL”. During PP, you will be qualified for a no-cost trial if you accept the default configuration when you provision your instance. The trial details are:
- 5 free trials are available per billing account.
- 1 free trial for your instance per Firebase project, although you can have multiple non-free instances within that project.
- The default configuration of your instance on Cloud SQL is equivalent to a db-f1-micro instance that has 1 vCPU, 10 GB of storage, and 628.74 MB of memory.
During the no-cost trial, you can add computing resources to your instance, set up a private IP for your instance, and create a read replica for your instance. Doing so will incur costs according to Cloud SQL pricing.
After GA, existing users participating in PP trials will automatically roll into the 3-month no cost trials when GA starts, and new users can sign up for a 3 month no-cost trial for the default Cloud SQL instance created using Firebase Data Connect.
After 3 months, pricing starts as low as $9.37 / month, and pricing varies based on regions and configurations. Cloud SQL pricing consists of three components:
See Cloud SQL pricing for more details.
Calling CloudSQL Directly
If you are using Data Connect under the usual circumstances, you will not be calling CloudSQL directly, and in the case that you are, you will have egress charges and maybe operation count charges. This use-case is likely only for more advanced users, those who have knowledge of existing systems and are explicitly calling the CloudSQL service.
Vertex AI Pricing
If you want to use Data Connect for vector similarity search, you’ll need to integrate Vertex AI’s Embeddings API. As such, there will be charges for embedding generation.
Resources
Pricing is an essential consideration for any used technology in app development, so we hope this is helpful for you in clarifying any questions and concerns you may have in using Firebase Data Connect. You can check out the Firebase pricing documentation and the Data Connect documentation for the most up-to-date information on pricing.
In the meantime, give Data Connect a try. We can’t wait to see what you build with it!