Limit Child Nodes
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.
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
- Firebase Realtime Database
- Cloud Functions
When you use Firebase Extensions, you're only charged for the underlying resources that you use. A paid-tier billing plan is only required if the extension uses a service that requires a paid-tier plan, for example calling to a Google Cloud Platform API or making outbound network requests to non-Google services. All Firebase services offer a free tier of usage. Learn more about Firebase billing.
What you can configure
- Cloud Functions location
- Realtime Database path
- 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