Does Firebase Work in China?
Tags: firebase, china, googlecloud, mobile
Published: 2022-04-13 18:58:37

---
canonical_url: https://www.21cloudbox.com/solutions/does-firebase-work-in-china.html
---

In this article, we will walk you through some speed tests we conducted to determine if Firebase works in China or not. Our staff conducted the tests in Shanghai (China Mainland) and the United States. We used 3rd party testing tools to ensure our tests weren't biased. 

By the end of this article, you should be able to explain to your boss: 

1. Does Firebase works in China 🇨🇳
2. How can I make Firebase work in China 🇨🇳

---


## What is Firebase?

Firebase is Google’s mobile application development platform with a suite of services to help you build, improve, and grow your app.


![Firebase's Suite](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/curc4jl714fk50zmk2e6.png)

<hr>
### Firebase Core Services


1. **Analytics**: Monitor app usage and gain insight into who your users are, and what actions they're taking inside your app.

2. **Cloud Firestore**: Build serverless, secure apps at global scale. Store app data in the cloud, sync data across online and offline devices, and retrieve it with expressive queries.

3. **Firebase Hosting**: Deploy fast-loading, secure websites that are backed by a global CDN without all of the hassle. 

4. **Realtime Database**: Build serverless apps by storing and syncing JSON data between your users in near-realtime, on or offline, with strong user-based security.

---


## Does Firebase work in China?

**The short answer is no**. 

According to Google Beijing, Firebase is blocked and can’t be accessed in China along with other Google services.

Don’t just take our word. Lets take a look at a few test to see how Firebase core services work in China.


### Does Firebase Realtime Database work in China?


We used the ping command (-c) to test if the database is accessible (ping-able) from our servers in Shanghai and US. 

First, to show you what a working Firebase ping test looks like, we ran one in the United States.  


![Firebase Speed Test in U.S.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1yrbwsntg6xlafxt90cz.png)

As expected, "0% packet loss", Firebase works in the U.S.


Now, lets look at 🇨🇳 China 🇨🇳.  


![Firebase Speed Test in China](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f123ueavum3uc1iy49ze.png)

This time the ping test show's "100% packet loss".  Meaning that Firebase Realtime database is NOT accessible in mainland China.


### Does Firebase Hosting work in China?


Using a third-party speed testing tool, we ran a China speed test on a small media asset hosted on Firebase to see how it would load across China.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eh8lqajzjvab8w3s9g27.png)

---


## How to make Firebase work in China?

At the beginning of this article, we promised to provide you with a solution to make Firebase work in China.  Now lets run some tests and provide proof that our Yammo acceleration technology can deliver what we promise.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tyche39dnsdu1krm89hf.png)

<br>
### Yammo + Firebase Realtime Database
<br>

We ran a China speed test on a Firebase Database. The results below show us that the Firebase database was difficult to access across most of China.

<br>

![Firebase Speed Test China](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5gwwc6ro21dahg17l36j.png)
Orange, Yellow, White = **Bad**, Slow ; Green = **Good**
<br>

Next, our engineers created a Yammo accelerated version of the Firebase database. 

<br>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zvuvu91hz8rht3eo2b7l.png)
**All Green** 😎
<br>

As promised, Yammo made the Firebase database available in China 🇨🇳.

<br>
<hr>
<br>

If you have additional questions or need help getting your Firebase services working in China, please [contact us](https://www.21cloudbox.com/contact.html), we are happy to help.


---

For additional detail and future modifications, refer to the [original post_](https://www.21cloudbox.com/solutions/does-firebase-work-in-china.html)