Firebase - Concurrent Connections without Users being online - firebase

I´m using the Firebase Realtime Database and Cloud Functions.
I´m testing my app with two users.
However, in my Database Usage Page it says that the maximum concurrent connections were 37. Also, it says that I had 8 simultaneous connections at a day on which I actually did not test my app at all.
How does this work? I´m familiar with the definition given in the Firebase FAQ.
Do cloud functions count to the connections as well?
Best regards

Related

Firebase Realtime Database SSL encryption overhead

I’m using the realtime database for my Flutter app.
I’ve red on the Firebase website the db uses SSL encryption overhead. ~ 3.5kb
My app uses multiple listeners and does a lot of update operations. ~ 3 listeners and 50 updates per user session
Do I have to ‘pay’ 3.5kb with every operation?
Or is the ssl connection only once when the app is launched?
Thanks in advance !
Contacted firebase support about this:
"The Admin SDK for Node uses a socket to connect to the Firebase
database. It does not use the REST API. Bandwidth while negotiating
the HTTPS/WebSocket connection is billable traffic here too. The
building of this connection from Cloud Functions to the Database
happens when a new container is created. This can be upon the first
deployment of the project's functions, after a period of inactivity,
or when the Cloud Functions needs to be scaled-up due to high
activity."

Firestore reads - inconsistency between App Engine Quota and Firebase Console

I started using Firestore recently (Free plan) in my iOS app, the app is in Production now, and I see huge discrepancy in the number of Reads. App Engine Quota shows 1M reads of 0.05M (free quota) (Cloud Firestore Read Operations), while Firebase Console (Database tab) shows just a one hundred reads for today - 10,000 times difference!
The app can still read the data from the servers (it's not from cache as I tried to delete the app and reinstall), so the Firestore functionality is not limited by exceeding the free quota.
Each app user can read only one document (via listener) with applied security rules, and it reads own document only 3-5 times per session. There are about 50 users so far, so the expected number of reads matches Firebase console.
Is there a known bug in App Engine console?
Is there a way or free tool to understand the source of all those reads?
Which reporting tool is more reliable in general - Firebase Console or App Engine Console?
I appreciate your help guys!

Need python files stored in Google Database to compile in Google Cloud Engine and return data to an IOS App

My Current Plan:
I'm currently creating an IOS App that will access/change java/python files that are stored in the Google Cloud Storage. Once confirmed the App will talk with App Engine that will have a Compute Engine VM receive files and compile them. Once compiled have the result returned back to the IOS App
Is there any better or easier method to achieve this task? Should I use firebase or Google Cloud Functions? Would it be any help
Currently, I'm lost how to design and have requests sent between many platforms.
It would also depend on what type of data processing you are doing to the files in Cloud Storage. Ideally you would want to avoid as many "hops" between services as possible. You could do everything via Cloud Functions and listen on GCS Triggers. You can think of Cloud Functions as a sudo App Engine Backend to use for quick request handling.
Use Cloud Functions to respond to events from Cloud Storage or Firebase Storage to process files immediately after upload
If you are already using Firebase, it would be better to stay within their ecosystem as much as possible. If you are doing bigger or more intensive data processing you might want to look at different options.
With more information and current pain points, we may be able to offer more insight.

Profiling firebase storage requests

I have an app which uses firebase storage and I am observing an unusual traffic to the storage. The bandwidth usage is unusually high, which shouldn't happen with the usual behavior of the app.
I need to isolate a user or a stored file which causes this unusual bandwidth usage. Is there any way I can get more information about the storage usage, other than the information shown at the Usage tab of firebase console?
Firebase Storage only tracks and shows aggregate data for the usage in your project. It does not tie this usage to specific Firebase Authentication users.
If you need that, consider adding your own tracking for this, for example by logging uploads/downloads to Google Analytics for Firebase.
You can also log to Stack Driver, although it might only be in aggregate there too. For the exact metrics, see the Google Cloud Platform documentation on its storage metrics.
Alternatively you could reach out to Firebase support for personalized help in troubleshooting. But I'm not sure if they have access to the type of data you're looking for.

Local database with later opt-in

I wrote an app that contains data that is sensitive to certain users which so not want it to end up online. I want to allow to use the app with firebase offline only with the option to sync at a later time. Is this possible with current ios and android firebase implementations as a replacement for sqlite database?
The Firebase Database is primarily an online database that can handle intermittent and medium-term lack of connectivity.
While the user is not connected, Firebase will keep a queue of pending write operations. It will aggregate those operations locally when it loads the data from disk into memory. This means that the larger the number of write operations while the user is offline, the longer loading will take and the more memory the database will use.
This is not a problem in the intended use-case: online apps that need to handle short/medium term lack of connectivity. But it is not a suitable database for long-term offline databases.

Resources