<p>I am trying to understand how we can create circuit breakers for cloud run services,Unlike in GKE we are using istio kind of service mesh how we implement same thing cloud Run ?</p>

<p>On GKE you'd <a href="https://cloud.google.com/traffic-director/docs/configure-advanced-traffic-management#circuit-breaking" rel="nofollow noreferrer">set up a circuit breaker</a> to prevent overloading your legacy backend systems from a surge in requests.</p>
<p>To accomplish the same on Cloud Run or Cloud Functions, you can set a <a href="https://cloud.google.com/run/docs/configuring/max-instances" rel="nofollow noreferrer">maximum number of instances</a>. From that documentation:</p>
<blockquote>
<p>Specifying maximum instances in Cloud Run allows you to limit the scaling of your service in response to incoming requests, although this maximum setting can be exceeded for a brief period due to circumstances such as <a href="https://cloud.google.com/run/docs/about-instance-autoscaling#spikes" rel="nofollow noreferrer">traffic spikes</a>. Use this setting as a way to control your costs or to limit the number of connections to a backing service, such as to a database.</p>
</blockquote>
