[ Web Proxy ]
URL:
Viewing: https://firebase.google.com/docs/remote-config/web/real-time [Back]  [Original]

Understand real-time Remote Config  |  Firebase Remote Config Skip to main content
Overview Fundamentals AI Build Run Reference Samples
Firebase [Firebase]
Send feedback

Understand real-time Remote Config Stay organized with collections Save and categorize content based on your preferences.

Select platform: iOS+ Android Web Flutter Unity C++

Real-time Remote Config lets you receive updated parameter keys and values as soon as they're published on the server. This lets you quickly update any type of app attribute controlled using a Remote Config parameter value. With real-time Remote Config updates, you can:

To learn more about ways you can use Remote Config, see What can you do with Remote Config?

In this guide, you'll:

Real-time updates are available for Firebase JavaScript SDK v12.3.0+.

The real-time client-server connection

When you implement real-time Remote Config in your app, you create a real-time listener that opens an HTTP connection to the Remote Config backend. The request includes the config version that's cached on the device. The real-time Remote Config server uses an invalidation message to signal to the app when a newer version of a server-side config should be fetched.

If the server has a newer version, it sends the invalidation signal immediately. If it doesn't have a newer version, it keeps the connection open and waits until one is published on the server. When the client SDK receives an invalidation signal, it automatically fetches it, then calls the listener callback registered when you opened the listener connection. This fetch is similar to the fetch call you can make with the SDK, but bypasses any caching or minimumFetchInterval setting. The client-server connection is maintained while the app is in the foreground.

Real-time Remote Config client-server workflow [Real-time Remote Config client-server workflow] Real-time Remote Config client-server workflow

Since the client-server connection is made over HTTP, it doesn't require any dependencies on other libraries.

Listen for updates

Real-time updates complement Remote Config fetch calls. We recommend calling fetch when your app starts (or sometime during your app's lifecycle) and listening for real-time Remote Config updates during the user session to ensure that you have the latest values as soon as they're published on the server.

To listen for updates, call onConfigUpdate, implementing a callback that is invoked whenever a Remote Config update is available in the app. Behind the scenes, this call starts listening for updates from the Remote Config server. To learn more about the client-server relationship, see the previous section.

The callback is often a good place to use activate to make the updated config parameters available to your app. See Firebase Remote Config Loading Strategies for additional strategies to activate parameter values when you're using real-time Remote Config.

Selectively activate parameter values

When you call onConfigUpdate, you can await the change and activate it.

The next callback is called when both a new version of the template has been automatically fetched and when that new version has changes to the active parameter values in the app.

These callbacks are invoked with a parameter configUpdate. configUpdate contains updated_keys, which is the set of changed parameter keys that initiated the real-time update and includes the following:

If you're using a real-time listener in a particular view within your app, you can check if the parameters relevant to that view have changed before activating.

Occasionally, a fetch (either initiated when you call the fetch method, or by real-time Remote Config) does not result in an update for the client. In these cases, the next method or completion won't be called.

Add and remove listeners

onConfigUpdate is the main entrypoint for real-time Remote Config. Calling this listener for the first time in your app's lifecycle opens the connection to the backend. Subsequent calls reuse the same connection, multiplexing the invalidation message described in the real-time client-server connection.

The call returns a "listener registration," which has a method called Unsubscribe. To stop listening for updates, you call the Unsubscribe function that was returned when you initially registered the observer. If this is the only active listener, calling Unsubscribe will close the real-time connection to the server.

Although you can manually stop listening for updates, it's often not necessary. Real-time Remote Config automatically stops listening for updates when the app enters the background and restarts when the app is foregrounded.

Real-time Remote Config limits projects to 20 million concurrent open connections. If a project exceeds this limit, incremental real-time connection requests may be rejected, and the client SDK will automatically fall back to the standard fetch mechanism. To ensure all clients receive configuration updates when published, this 20 million connection limit is temporarily suspended for the project while the newly-published template is propagating.

Next steps

Check out Get started with Firebase Remote Config to configure Remote Config and start listening for updates in real-time.

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-19 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-19 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page