The Simplest Way to Make Cloud Run and IIS Work Like They Should
Teams pair cloud run and iis to connect modern Linux containers with legacy Windows apps. Cloud Run handles fast web traffic while IIS runs older .NET code on virtual machines. This split design lets you ship new features without a full rewrite of old systems. You keep core business logic on Windows while scaling public APIs on serverless containers. Getting these two platforms to talk safely takes careful identity and network planning. How identity and data flow between cloud run and iis Cl
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair cloud run and iis to connect modern Linux containers with legacy Windows apps. Cloud Run handles fast web traffic while IIS runs older .NET code on virtual machines.
This split design lets you ship new features without a full rewrite of old systems. You keep core business logic on Windows while scaling public APIs on serverless containers. Getting these two platforms to talk safely takes careful identity and network planning.
How identity and data flow between cloud run and iis
Cloud Run runs stateless containers that start and stop based on incoming web requests. Each service runs under a dedicated cloud service account with its own identity. IIS runs on Windows Server machines that often rely on Active Directory or local accounts.
Bridging these two login models is the main hurdle for engineering teams. A container in Cloud Run cannot use Windows domain logins out of the box. Instead, the container must prove its identity using web tokens or client certificates.
Data flows from the serverless container over a private network link to the Windows server. Teams use a virtual private cloud connector to keep this traffic off the public internet. The container sends an encrypted web request to the private IP of the IIS host.
IIS checks the incoming token or certificate before it runs the local Windows code. Once verified, IIS processes the request and sends the response back to the container. The container then formats the output and returns it to the end user.
Common failure modes and how to scope access
Many teams take shortcuts when linking serverless apps to older Windows web servers. A common mistake is putting a shared static password inside the container settings. If that key leaks, anyone on the network can call the internal Windows app.
Another failure mode is opening broad firewall rules across the whole internal subnet. Cloud Run scales up and uses many IP addresses from its assigned network range. Teams sometimes open the entire network range to every port on the Windows machine.
Shared service accounts also create blind spots in your server audit logs. When ten Cloud Run services use one login, IIS logs show only one user. You cannot tell which container sent a bad request or triggered a database error.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, give each Cloud Run service its own unique service account. Map each service account to a specific role inside your Windows web app. Restrict the firewall so the connector subnet can reach only the HTTPS port on IIS.
Rotate client certificates often and store them in a dedicated secret manager. Set up IIS to log the caller identity on every single web request. Turn on data masking to rewrite emails, phone numbers, and card numbers in your logs.
Managing network paths and scaling limits
Serverless containers scale much faster than traditional Windows virtual machines can handle. A sudden traffic spike can spin up hundreds of Cloud Run instances in seconds. This burst of traffic can overwhelm the thread pool on a single IIS server.
You must set a maximum instance limit on each Cloud Run service. This cap stops the serverless tier from flooding the older Windows backend during peak load. You should also place an internal load balancer in front of multiple IIS hosts.
Connection pooling is another vital piece of a stable cross-platform setup. Containers should reuse open network sockets instead of making a new handshake every time. Proper timeouts on both sides prevent hung requests from locking up Windows worker processes.
Keep health checks simple and fast so the load balancer drops bad nodes quickly. When a Windows server installs updates, the load balancer shifts traffic to healthy machines. Your serverless apps keep running without dropping user requests during maintenance windows.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
How does Cloud Run reach an internal IIS server without a public IP?
Use a virtual private cloud connector to link the serverless container to your private network. The container sends traffic over internal IP addresses straight to the Windows machine.
How can we stop Cloud Run from overloading our IIS machines?
Set a strict maximum instance limit on the Cloud Run service to cap outgoing requests. Put an internal load balancer in front of your IIS servers to spread the load.
What is the safest way for a Linux container to log in to IIS?
Use short-lived web tokens or mutual TLS client certificates tied to a unique service account. Avoid storing static passwords or shared domain keys inside your container settings.
Related guides
In this post