How to Reduce Firebase Costs When Sending City-Wide Notifications

Database & APIs

Hi everyone,

I need help finding a more cost-efficient way to handle notifications in my app.

Currently, every time a user creates a new job post, I need to notify all users who are registered in the same city. This is essential to drive engagement and get people to open the app as soon as new opportunities are available.

The challenge is: to send notifications, I first need to query the database and retrieve the document references of all users in that city. Since there are more than 10,000 users per city, this results in over 10,000 read operations every time a single job is created. This is causing my Firebase costs to rise quickly and unsustainably.

Does anyone have any suggestions on how to optimize this logic to reduce reads and keep costs down?

Any help or insight would be greatly appreciated!

What have you tried so far?

Cache doesn't seems to help

Did you check FlutterFlow's Documentation for this topic?
No
2
8 replies