


The following table describes some basic considerations for usingĬloud Functions for Firebase versus Cloud Run. Serverless environment, the two options can be leveraged for different use casesĪnd desired level of customized configuration. While both Cloud Functions for Firebase andįirebase Hosting and offer a fully managed, autoscaling, and secure Sharing across various social networks by creating dynamic meta tags. Prerender your single-page apps - You can improve SEO and optimize You can also potentially reduce execution costs because theĬontent is served from the CDN rather than via a triggered function or For an example, check outĬonfigure caching of your dynamic content onįor example, if a function generates new content only periodically, youĬan speed up your app by caching the generated content for at least a short While your website is hosted at /, any request to /api is Your Hosting site, you can serve dynamically generated responses from aįunction or containerized app that is performing server-side logic.įor example, you can point a URL pattern (like /blog/) to aįunction that uses the URL's blog post ID parameter to retrieve contentīuild REST APIs - You can create a microservice API using functions.įor instance, functions can handle the sign-in functionality for your Serve dynamic content - In addition to serving static content on


How can you use serverless computing options with Firebase Hosting? Then, using Firebase Hosting, youĬan direct HTTPS requests to trigger your containerized app to run. Then, usingįirebase Hosting, you can direct HTTPS requests to trigger your functionĪpplication packaged in a container image. Your functions and containerized apps to run in a managed, secure environment.Ĭloud Functions for Firebase: You write and deploy aįunction, which is backend code that responds to a specific trigger. These options, you can host microservices by directing HTTPS requests to trigger Firebase Hosting integrates with serverless computing options, includingĬloud Functions for Firebase and Cloud Run.
