Regarding Firebase Realtime Database Latency

514 views
Skip to first unread message

PARTHESH PAWAR

unread,
Feb 4, 2022, 10:58:08 AM2/4/22
to Firebase Google Group
Hello everyone,

We are working on a project which uses NodeMCU ESP32S in order to send data to realtime fireabase database using updateNodeAsync().

The problem we are encountering is that after every 100 writes there is huge delay for the next write. Up to 100 writes it works very fast and database node gets updated in 10ms on average. But for the next update request it takes atleast 2-3 sec which is very sensitive in the context of our project.

it happens as follows:
1st - 100th write ~ takes approx 10ms each
101th write ~ takes more than 2-3 sec
102th - 202th write ~ takes approx 10ms each
203th write ~ more than 2 sec
and so on..   its forming a pattern after every 100th update..

We searched for this everywhere but didn't find any solution. We are currently using free tier firebase. Also tried locked/test mode and authentication as well.


Jeffrey Dallatezza

unread,
Feb 4, 2022, 12:30:36 PM2/4/22
to Firebase Google Group
Hello,

A good way to start is by using the profiler to get more information on how much time is taken by requests on the backend.

I'd like to take a look at stats for your database instance too. For that can you provide me with the full URL of your database or the project name, either here or through our support team?

PARTHESH PAWAR

unread,
Feb 11, 2022, 4:43:28 PM2/11/22
to Firebase Google Group
Hello and Thanks for the reply,

We came to know where the issue is.. actually after every 100 node update operations. Firebase object in ESP32 is cleared and session re-establishment takes place. We read somewhere as it uses HTTP protocol , so ESP32 - firebase session re-establishment happens again and again. For this it takes approx 2-3 seconds which is too much for our project as we need  continuous data every 100ms without any delay.

Is there a way to achieve this with Firebase. We are currently using <FirebaseESP32.h> library & updateNodeAsync() function.
Reply all
Reply to author
Forward
0 new messages