voila
voila

Reputation: 1666

Firebase concurrent connections?

I came across a post Concurrent firebase

As per top answer on the post if a user John come online at 12:00 , stay online for 24 hours , user Mike come online at 12:01 , stay online for 24 hours , user Jack come online at 12:02 , stay only for 24 hours, Then firebase have only 1 concurrent connection in 24 hours.

Did I understand correctly?

I was confused because I was thinking concurrent connection means connections to server at a time but as per explanation above concurrent connections mean connections start at same time?

Upvotes: 0

Views: 951

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 599661

I have no idea how you got from that accepted answer by @MikePugh to your conclusions. The text:

Concurrent connections are just that - connections established at the same time. So if you have 3 people using your app to check scores, but user 1's app goes online at 12:00 PM and the connection lasts for 5 seconds, then user 2's app goes online at 12:01 PM for 5 seconds, and user 3's app goes online at 12:02 PM for 5 seconds then you've only ever had 1 concurrent connection.

I added emphasis on the parts that you seem to have skipped in your copy.

In the example Mike gave, each user was connected only for a very short time. So there was never more than a single concurrent connection. In fact, for the majority of the day (23 hours 59 minutes 45 seconds) there were 0 connections. Given that Firebase bills at the 95th percentile, you'd be billed for 0 concurrent connections (if they'd offer such a tier).

You indicate that your users stay connected for 24 hours, which leads to 3 concurrent connections from 12:02 to midnight. So you'd have 3 concurrent connections for the majority of the time.

Upvotes: 2

Related Questions