<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>go on Stewie</title><link>https://stewie1520.github.io/tags/go/</link><description>Recent content in go on Stewie</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 02 Sep 2024 17:33:00 +0700</lastBuildDate><atom:link href="https://stewie1520.github.io/tags/go/index.xml" rel="self" type="application/rss+xml"/><item><title>Circuit Breaker</title><link>https://stewie1520.github.io/posts/circuit-breaker/</link><pubDate>Mon, 02 Sep 2024 17:33:00 +0700</pubDate><guid>https://stewie1520.github.io/posts/circuit-breaker/</guid><description>Your order-service calls payment-service over HTTP. One day payment-service doesn&amp;rsquo;t go down. It just gets slow: every request takes 30 seconds, then times out.
Here is what happens to order-service:
Each incoming request waits 30 seconds on the payment call, holding a goroutine, a connection, some memory. New requests keep coming in, and they wait too. The connection pool runs dry. Requests that have nothing to do with payments start to queue.</description></item></channel></rss>