<?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>Backpressure on Rafiul Alam</title>
    <link>https://alamrafiul.com/tags/backpressure/</link>
    <description>Recent content in Backpressure on Rafiul Alam</description>
    <image>
      <title>Rafiul Alam</title>
      <url>https://alamrafiul.com/papermod-cover.png</url>
      <link>https://alamrafiul.com/papermod-cover.png</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Fri, 19 Sep 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://alamrafiul.com/tags/backpressure/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Producer-Consumer: The Bounded Buffer</title>
      <link>https://alamrafiul.com/blogs/producer-consumer-bounded/</link>
      <pubDate>Fri, 19 Sep 2025 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/blogs/producer-consumer-bounded/</guid>
      <description>&lt;h2 id=&#34;from-unbounded-to-bounded&#34;&gt;From Unbounded to Bounded&lt;/h2&gt;
&lt;p&gt;In the &lt;a href=&#34;https://alamrafiul.com/blogs/producer-consumer-unbounded/&#34;&gt;previous article&lt;/a&gt;, we explored the unbounded buffer pattern where the queue could grow infinitely. This works until you run out of memory!&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;bounded buffer&lt;/strong&gt; adds a crucial constraint: &lt;strong&gt;maximum queue size&lt;/strong&gt;. This introduces &lt;strong&gt;backpressure&lt;/strong&gt; - when the buffer is full, producers must wait for consumers to catch up.&lt;/p&gt;
&lt;h2 id=&#34;why-bounded-buffers-matter&#34;&gt;Why Bounded Buffers Matter&lt;/h2&gt;
&lt;p&gt;Bounded buffers appear everywhere in production systems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;TCP sliding windows&lt;/strong&gt; (flow control)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HTTP/2 stream flow control&lt;/strong&gt; (prevents overwhelm)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Message queue limits&lt;/strong&gt; (RabbitMQ, Kafka partition limits)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thread pool queues&lt;/strong&gt; (bounded task queues)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rate limiters&lt;/strong&gt; (token buckets with finite capacity)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Circuit breakers&lt;/strong&gt; (limit concurrent requests)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The key benefit&lt;/strong&gt;: Bounded buffers provide &lt;strong&gt;natural backpressure&lt;/strong&gt; and prevent resource exhaustion.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Rate Limiter Pattern in Go</title>
      <link>https://alamrafiul.com/posts/go-rate-limiter/</link>
      <pubDate>Wed, 24 Jul 2024 00:00:00 +0000</pubDate>
      
      <guid>https://alamrafiul.com/posts/go-rate-limiter/</guid>
      <description>Implement rate limiting patterns in Go using token bucket, sliding window, and fixed window algorithms for controlling request rates and preventing system overload.</description>
    </item>
    
  </channel>
</rss>
