Firestore/Firebase with CLoud Function location Choice

141 views
Skip to first unread message

Sijohn Mathew

unread,
Jan 1, 2020, 12:06:24 PM1/1/20
to Firebase Google Group
Hi all,

Happy New Year !!!
We have our users based out of India and we are using Firebase hosting (for web) & Firestore DB as the data provider for the app.
The app is always directly talking to FireStore DB.
But we do use lot of Cloud functions to do backend computations for the data in Firestore based on the user update events from the App.
The question is how should I select the region

Firestore has location in asia-south1 (Mumbai).
Cloud Function  DOES NOT have location in asia-south1(Mumbai). The nearest one is asia-east2 (Hong Kong).

Is it advisable to host the App, Firestore DB & Cloud Function together in one location. In this case  asia-east2 (Hong Kong)
OR
Should we keep the App Hosting & Firestore DB in asia-south1 (Mumbai) region (Close to Users) & Cloud Function in asia-east2 (Hong Kong)

PS: The cloud functions are very critical for us as the updates made by user in the app has to be computed (Cloud function) and reflected immediatley in the UI.

Regards,
Sijohn Mathew


Kato Richardson

unread,
Jan 2, 2020, 12:30:42 PM1/2/20
to Firebase Google Group
Hi Sijohn,

For general advice, keep them together. They can take advantage of some egress/in-region reduced pricing. Note that Firestore doesn't take advantage of these yet in relation to Functions, but may in the future.

If the latencies between regions are a concern, then Functions are likely to be too slow in any regard. Be sure to test thoroughly before deciding here. Cloud Run isn't any faster, but may have more regional availability now or in the future; may also look at that to see if it helps.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/2a2bba45-0068-4e1d-ad58-3c8981976553%40googlegroups.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages