I want to host my static webapp created with Next.js' export function on firebase. The app rebuilds itself to static html when changes in the underlying database are made. Since I can't directly deploy this static pages automatically to firebase hosting, I tend to serve the static files from with.
So, are there any downsides of serving static html content with Express.js inside firebase function compared to using firebase hosting?
Especially with regard to: Pricing, Security and Performance/Speed.
We hosted our site (https://mfy.im) under Firebase hosting, it's generated using nuxt, similar to your next.js. We've compared many other static hosting sites including Netlify, S3, etc. Firebase hosting was the best in performance
Even though Express can serve your static files, it's not recommended. Firebase internally uses Nginx. Nginx is super fast in serving static files and it's multithreaded. In Nginx, its easy to confiture http2, gzip etc. (full http2 support is recently released in Node 10, gzipping files in node js is also not that performant since the node is single threaded)
Other advantages of Firebase hosting is its edge servers, built-in CDN, SSL etc. A copy of your site is deployed on multiple servers all around the world which results in low latency. I've tested Firebase CDN vs CloudFlare, again Firebase was the best
Regarding Pricing, Firebase hosting comes with a free plan of 10GB bandwidth. It should be efficient for small-medium websites. If your bandwidth usage is higher than that you can go for 'Pay as you go'. However, if you're worried about pricing you can combine Firebase hosting with CloudFlare CDN so that CloudFlare will cover most of the bandwidth
Related
I just setup a Firebase Hosting and deployed it.
My question is, can I use this hosting as a cdn to load content on my other already published site?
Is this a good practice?
Also, is there a limit on firebase hosting requests?
If for e.g. there are too many requests to a particular file type, does it still work or will it throw any error?
Firebase hosting is advertised by Google as edge optimized SSD storage in their CDN infrastructure. Google's documentation suggests that this is a supported use case.
If you are already using firebase, that should work for you. Implement, measure. Keep measuring as traffic volume and patterns change.
If it isn't meeting your needs, move to a different CDN solution.
I'm hosting a static website generated by Hugo on Google Firebase. I know Firebase simplifies a lot of things from Google Cloud via its console and default settings. However, I'm hoping to make my site faster, and I was wondering if there was any settings I could change on the larger Google Cloud platform such as increasing the number of places the site deploys from, or using an SSD, or a faster virtual machine etc.
This is for a static website generated by Hugo being hosted on Google Firebase and with a CDN via CloudFlare. I've done plenty of optimization via the typical website optimization stuff, but I was wondering if there was anything I could do on Google Cloud Platform to increase the reach of my site and its speed etc.
Firebase Hosting doesn't have any configurations that tune its runtime behavior, in terms of performance. The only configurations it has are documented here.
I have a small firebase project site that I've been working on and is now public and gaining more traction than I thought. I doubt I'll hit Firebase's 10GB hosting transfer cap, but this got me thinking as to whether or not I'd be better served storing my site assets in Firebase Storage, and if that would help at all. I'm a bit new to these cloud service pricing models, so any help would be greatly appreciated. Boiling it down, here are my questions:
I have 20mb of assets currently stored in a /rsc/ directory on my hosted site. Would it lessen my Hosting "Data Transferred" to move these assets to Firebase Storage (Would the data transferred be logged under my Storage quota)?
Yes, if you put the files in Cloud Storage instead those will not be counted against the Firebase Hosting bandwidth limits. However, you will lose out on the global CDN edge-caching and atomic rollout/rollback provided by Firebase Hosting.
I use Firebase hosting to host my Single Page App.
I have two versions of my websites :
one optimized for https/1.x
one optimized for https/2
Firebase hosting is now using https/2. But how to optimize the website for the people still using a browser who only support https/1.x? Knowing that, as of today, there is still 20% of the browser who don't support https/2.
I'm using Firebase hosting to store static files. I made a test on pingdom and the files are slow to load compare to others :
They say on Firebase that they are one of the fastest CDNs available. Why I can't get good performance?