Limit Child Nodes
Made by Firebase
Limits the number of nodes to a specified maximum count in a specified Realtime Database path.
How this extension works
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.
Before installing this extension, make sure that you've set up a Realtime Database instance in your Firebase project.
To install an extension, your project must be on the Blaze (pay as you go) plan
- You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension (even if it is not used).
- This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service’s free tier:
- Cloud Functions (Node.js 10+ runtime. See FAQs)
- Firebase Realtime Database
What you can configure
- Cloud Functions location
- Realtime Database path
- Realtime Database
- Maximum count of nodes to keep
Type: Cloud Function
Description: 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.
How to install this extension
Using the Firebase console
To install and manage extensions, you can use the Firebase console.Install using console
Using the Firebase CLI
To install and manage extensions, you can also use the Firebase CLI:
Step 1: Run the following npm command to install the CLI or update to the latest CLI version.
npm install -g firebase-toolsDoesn't work? Take a look at the Firebase CLI reference or change your npm permissions.
Step 2: Install this extension by running the following command
firebase ext:install rtdb-limit-child-nodes --project=projectId_or_alias