Is there a request limit for firebase hosting? - firebase

I have been trying to find how many requests can be made to a static website hosted via firebase but I can't seem to find an answer.

There are no limits to the number of requests. In terms of cost, everything you need to know is on the pricing page. Pricing has nothing to do with the volume of requests.

Related

403/405 status code Firebase Dynamic Link

I'm using Firebase Dynamic Link to redirect the users into our app and using the Google-provided domains (https://example.page.link) for the URL prefix. The link works fine for most people but sometimes some users might encountered with these issues:
Does anyone know what might cause this issue? I'm not sure how to reproduce these issues. Sometimes it will works after the user retry for multiple attempts.
Ps: It's a Flutter app. I've contacted Firebase support and they asked for minimal repro which I'm not sure how to create because it rarely happens but quite frequent. 😅
Possible Reason For this :
How many dynamic links can be created in firebase?
The quota is listed in the Dynamic Links documentation: Requests are
limited to 50 queries per second 5 requests/IP address/second, and
100,000 200,000 queries per day. If exceeded, then the response will
return HTTP error code 429/403/405.

Firebase hosting sub-domain limit

I am looking to host multiple sites using firebase but have read something that could cause problems.
Each custom domain is limited to having 20 subdomains per apex domain, due to SSL certificate minting limits.
https://cloud.google.com/storage/docs/hosting-static-website
I was hoping to use subdomains, e.g. a.example.com, b.example.com ...etc.
This limit of 20 domains seems quite restrictive and I have some questions
If I create separate projects for each subdomain does this limit still apply? e.g. have 1 firebase project with a hosting site for a.example.com and have a entirely separate firebase project for hosting b.example.com.
I have also read you can hosting using cloud storage and a load balancer. https://cloud.google.com/storage/docs/hosting-static-website. Does this provide an automatic certificate or is it manual?
Does the limit of 20 subdomains apply only to firebase hosting or does it also apply to hosting via cloud storage and a load balancer?
Thanks
This limit is per project, so if you put different domains on different projects they are not affected by it.
The documentation seems to describe the process pretty well: https://cloud.google.com/storage/docs/hosting-static-website#lb-ssl
This limit applies to Firebase Hosting only. Other products may have their own limits of course, but those would be listed in the documentation for that product.

is there a way to limit firebase hosting downloads for a specific custom demain?

We are in Flame plan on firebase and we are hosting many custom domains, so yesterday we noticed a sudden raise on a specific domain download (25Go ! in normal days it's 2Go maximum), so is there a way to limit specific domain downloads on firebase? and if we pass the limit of the Flame plan what are the consequences? thanks

Dynamically create subdomain for each client?

I know many ppl asked this question before. But they are answer years ago. Now it's 2020. Not sure if Firebase supports subdomain for each client now. Can anyone can give an update?
Link to the old question:
Firebase - Subdomain for each client
Wildcard domains (e.g. *.mydomain.com) are not yet supported by Firebase Hosting, and due to limitations of our Certificate Authority (Let's Encrypt), there are relatively low limits on the number of subdomains of a given domain that can have certificates minted in a given time period.
For now, the answer remains that this is not a use case that is supported well on Firebase Hosting, and we don't recommend using Firebase Hosting for massively multi-tenant custom domains at this time.

Can I add a domain to Firebase hosting via the API?

I want to be able to add domains to Firebase hosting with the API instead of the web UI, is that possible?
I want to add potentially hundreds of domains, is there a domain limit per project in Firebase?
As far as I can tell from the entire CLI documentation, there isn't any way to do this.
Lets take a step back and consider what the web UI process involves i.e. the generation of a TXT record to add to your DNS records, after verifying the presence of said TXT record on the domain, providing A records that you (authorized owner) add to allow redirecting to your firebase hosted site.
In my opinion, this very manual back and forth is necessary as a security measure. The only way it is taken out of the equation via the CLI is by providing a means for you to authenticate ownership of a domain (registered with any one of many domain registrars), and being granted authorization to change your A records. These are both outside the scope of Firebase, and could potentially introduce severe security flaws. Regardless, even if it existed, it would still have to be step-by-step and somewhat manual via CLI rather than the single command it sounds like you're looking for.
It is not possible to add custom domains automatically through an API at this time.
Nor would it allow you to create a reseller or multi-tenant project (i.e. connect a large number of domains or subdomains dynamically) since you cannot connect more than about 36 domains connected to one project.
It's possible to add domains using Firebase Hosting Rest Api. I am not sure why they didn't put it on their official website but I checked today and it works. https://developers.google.com/resources/api-libraries/documentation/firebasehosting/v1beta1/java/latest/com/google/api/services/firebasehosting/v1beta1/FirebaseHosting.Sites.Domains.html
Answer that I've received from Firebase support:
There is no API yet that would allow you to add custom domains, it was
requested as a feature before but unfortunately we have no more
information on that - so for now, only the Console UI allows you to do
it.
When it comes to the limits, in a project, a custom domain is
attached to a site - there can be 36 sites per project, and for one
site there is no hard limit, but we recommend not exceeding 20 custom
domains. You can experience technical issues with SSL certs when you
exceed 20 domains per site, which we won’t be able to troubleshoot
since the system was not designed for such use cases.

Resources