firebasegoogle-cloud-firestorehorizontal-scaling

How is Firebase scaled globally?


I am aware that Firebase allows for selecting so-called multi-region locations. Does that mean when I select Europe multi-region, then people in US or Africa will have slower access? I am talking mainly about Firestore. Does that mean I am supposed to create separate projects and sync data on my own?

Doing that with background cloud functions would not only take a lot of resources from the Blaze plan, but I don't think it can be reliable. Especially given the requirement all cloud functions need to idempotent and they could execute multiple times.

Cloud functions alone are also confusing as they don't have these multi regions. I need to deploy those to multiple regions and then have some balancing proxy that will pick the right region based on the origin of the request? And on top of that, I would need to select into which multi-region Firestore I will connect to.

I am mostly just doing research for my new project which I know will eventually need to be global so want to avoid vendor locking to a solution that would hinder performance. I am not solving any specific problem right now.

I am either missing something here or overthinking it.


Solution

  • Does that mean when I select Europe multi-region, then people in US or Africa will have slower access?

    Generally speaking, yes, clients that are geographically further away will have greater latency.

    Does that mean I am supposed to create separate projects and sync data on my own?

    You should benchmark and figure out if that helps your situation, relative to the amount of work you put into it.

    I need to deploy those to multiple regions and then have some balancing proxy that will pick the right region based on the origin of the request?

    I can't even begin to imagine what you're trying to do here, since you haven't stated the requirement for your application.

    I am either missing something here or overthinking it.

    Probably overthinking it, but you haven't stated what your actual requirements are, or what specific problem you're trying to solve, so it's not clear.