Skip to content

Latest commit

 

History

History

rtdb-limit-child-nodes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Limit Child Nodes

Author: Firebase (https://firebase.google.com)

Description: Limits the number of nodes to a specified maximum count in a specified Realtime Database path.

Details: Use this extension to control the maximum number of nodes stored in a Firebase Realtime Database path.

If the number of nodes in your specified Realtime Database path exceeds the specified max count, this extension deletes the oldest nodes first until there are the max count number of nodes remaining.

Additional setup

Before installing this extension, make sure that you've set up a Realtime Database instance in your Firebase project.

Billing

To install an extension, your project must be on the Blaze (pay as you go) plan

  • This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service’s no-cost tier:
    • Cloud Functions (Node.js 10+ runtime. See FAQs)
    • Firebase Realtime Database

Configuration Parameters:

  • Realtime Database path: What is the Realtime Database path for which you want to limit the number of child nodes?

  • Realtime Database: From which Realtime Database instance do you want to limit child nodes?

  • Maximum count of nodes to keep: What is the maximum count of nodes to keep in your specified database path? The oldest nodes will be deleted first to maintain this max count.

Cloud Functions:

  • rtdblimit: Listens for new child nodes in your specified Realtime Database path, checks if the max count has been exceeded, then deletes the oldest nodes first, as needed to maintain the max count.

Access Required:

This extension will operate with the following project IAM roles:

  • firebasedatabase.admin (Reason: Allows the extension to delete nodes from your Realtime Database instance.)