App Hosting has faster deployments, route-based monitoring, and improved CI/CD setup

We’re excited to share some recent updates to App Hosting that make it an even better platform for your full-stack web apps!

Since our last update (which included more ways to deploy), we’ve:

  • Made deployments faster by optimizing how apps are built
  • Enhanced the monitoring dashboard to provide deeper insights into specific parts of your app
  • Added GitHub connection management to the Firebase console, so you have the flexibility to set up CI/CD after your first deployment

Keep reading for more details.

Faster deployments

Your App Hosting deployments are getting faster. We’re rolling out a series of optimizations to the build pipeline, and the first is now live. The Next.js adapter for App Hosting now creates smaller containers for your server by optimizing which files are included in the deployment. This means the app binary that gets deployed is lighter weight and takes less time to upload and download.

Our internal monitoring suggests this change has made builds 30% faster for customers on average. This is just the first of many steps toward our goal of dramatically reducing deployment time on App Hosting.

Route-based monitoring

The App Hosting dashboard in the Firebase console has stats for your whole app, both on the Overview and Usage tabs:

These stats, which are based on metrics reported from Cloud CDN and Cloud Run, can give a great overview of the general health and performance of a web app. But some parts of an app are much more important than others, and that’s where route-based monitoring comes in. This new feature allows you to specify up to 20 routes in your app that are important to you, and shows metrics specific to each.

There are a variety of metrics designed to answer important questions about each route:

  • Requests: “How popular is this route?”
  • Errors: “Does my site work?”
  • Latency: “Do users have to wait a long time for my server-rendered pages to load?”
  • CDN cache hit rate: “How can I reduce latency and cost?”
Sample metrics for routes in an e-commerce app.
Sample metrics for routes in an e-commerce app.

For example, the checkout/* route of an e-commerce app is business-critical. If it starts showing elevated error rates, you can tell at a glance.

For product pages, you’d likely focus more on the CDN cache hit rate and latency metrics to make sure that shoppers can view new items quickly, and at minimal cost to you.

The requests to your backend can even serve as a basic analytics tool to understand your customer behavior based on requests to your backend without the need to add any additional scripts to your website. In the example above, shop/computers/* is about equal with shop/action-figures/*, but if one suddenly jumps above the other after a new marketing campaign, it would be a good indicator that the marketing efforts are working.

Just like the other charts in the App Hosting dashboard, rollouts are clearly marked so that you can see the impact of recent changes.

A sample e-commerce app showing improved latency after a rollout
A sample e-commerce app showing improved latency after a rollout

Add routes to your app today! Click “Manage routes” in the Firebase console to get started. Also, take a look at the Monitor routes documentation to learn more about accepted route patterns, pricing, and use cases.

The UI to add routes in the Firebase console
The UI to add routes in the Firebase console

Add a GitHub connection

App Hosting used to only support adding a GitHub connection at the time a backend was created, which meant you couldn’t easily switch a backend from a local deployment workflow to one with CI/CD. Now, you can set up continuous deployment for a backend at any time.

The Firebase console UI to connect a GitHub repository
The Firebase console UI to connect a GitHub repository

For example, you can publish to App Hosting from Firebase Studio without having a GitHub repo set up so you can quickly share your prototyped app with friends. When you’re ready to professionalize your workflow with CI/CD, you can create a GitHub repository for the app and connect your existing App Hosting backend to it. You can work on new features in branches, review in a pull request, and merge to your main branch knowing that App Hosting will deploy newly-merged pull requests automatically and securely.

Summary

We hope these updates make it easier for you to deploy and monitor your full-stack web apps. While you try them out, we’ll keep working to make App Hosting even better.

If you haven’t already, head over to the Firebase console and explore our documentation to deploy your first app. As always, if you have questions, you can reach out on any of our support channels, or post questions on Stack Overflow. And if you have ideas for any new features, let us know on UserVoice!