We use the real-time Firebase database to store ratings for each level for users who are connected to Facebook. We are still testing this feature and everything works fine, but the load is really very high. Each time this user opens the application, I upload a very small amount of data, about 20 bytes, and an additional 5 bytes for each level that it launches. After a few minutes, the download began to show more than 100 KB, which is very much and will not be scaled financially when we inform our users about it. Here is the data structure we use:
users{
facebook_id{
"firebase_id" : firebaseId,
"max_level" : maxLevel,
"stars" : numberOfStars,
"scores" : {
level : score,
}
}
}
I also profiled the CLI database, and there were 0 non-indexed queries, and the use seemed correct.
Here is a screenshot.
Does anyone know what could be wrong? If this is just SSL overhead (which still seems too big), we also note what we could do, but set up our own server.
source
share