Do i need to go all the way and use an External Application load balancer (ALB) just to set up custom domain mappings for a Cloud Run service? I do not have any other requirement like setting up routing to multiple backend NEGs or attaching a CDN or WAF in the form of Cloud Armour which are typical use cases for an Application load balancer. In summary i will need to pay for the LB just for the SSL certs for custom domains looks like.
Hi @dheerajpanyam ,
While using the global external Application Load Balancer is the recommended option for setting up a custom domain for a Cloud Run service, this is indeed costly for your architecture needs.
You may want to explore other options that are more cost-effective but only if applicable:
- Use the Cloud Run integrations feature for Firebase Hosting
Pros:- Integration is straightforward if you are already using Firebase for your application
- Low price and optionally allows you to host and serve static content alongside the dynamic content served by your Cloud Run service
- Includes a no-cost tier (Spark plan) tier for hosting static assets and basic serving needs
- Storage: 10 GB
- Data transfer: 360 MB/day
- Supports: Custom domain & SSL, Multiple sites per project
Cons: - May not be suitable if you are not using Firebase or if your application requires more dynamic behavior not supported by Firebase Hosting
- Limited availability and features in preview mode may mean less stability and support
- Use Firebase Hosting with manual configuration
Pros:- Allows more flexibility and control over configuration compared to the integration feature
- Can be used independently of Firebase features if needed
- Includes no-cost tier (Spark plan) available for basic hosting needs
- Storage: 10 GB
- Data transfer: 360 MB/day
- Supports: Custom domain & SSL, Multiple sites per project
Cons: - Requires more manual setup and maintenance compared to the integration feature
- Limited to serving static content and requires additional setup for dynamic content through Cloud Run or other services
- Use Cloud Run domain mapping (Limited availability and Preview)
Pros:- Allows mapping custom domains directly to your Cloud Run services
- Simplifies deployment and management if you’re already using Cloud Run
Cons: - Limited availability and features in preview mode may mean less stability and support
- Have a list of limitations including supported locations, manual DNS update, etc.
Conclusion: Considering the pros and cons above, Firebase Hosting would be the most cost-effective then Cloud Run domain mapping. But if any of these options are not applicable, global external Application Load Balancer is your best choice.
Hope this helps.
Hi @jaydubu
What is the cost of Cloud Run Domain Mappings? I have 5 user facing applications and each of them has a staging and a production service. To route my domain to these services, I configured Cloud Run Domain Mappings for the staging services. For the production services, I configured through Custom domains - Google Cloud Load Balancing.
I know that Cloud Load Balancer cost depends on the number of forwarding rules (among other things). But I could not find any documentation on the Cloud Run Domain Mappings. Do these mappings count as forwarding rules and add to the cost of my load balancer?
