<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Tech Cafe - java</title>
    <subtitle>Dev adventures, epic bugs, tiny wins, and the occasional meltdown.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://golden-fox.tech/tags/java/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://golden-fox.tech"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-06-17T00:00:00+00:00</updated>
    <id>https://golden-fox.tech/tags/java/atom.xml</id>
    <entry xml:lang="en">
        <title>Mini API Gateway</title>
        <published>2026-06-17T00:00:00+00:00</published>
        <updated>2026-06-17T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Aakriti Agarwal
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://golden-fox.tech/projects/mini-api-gateway/"/>
        <id>https://golden-fox.tech/projects/mini-api-gateway/</id>
        
        <content type="html" xml:base="https://golden-fox.tech/projects/mini-api-gateway/">&lt;p&gt;I kept hearing about API gateways but never really understood what was going on inside one, so I decided to build a small one myself.&lt;&#x2F;p&gt;
&lt;p&gt;The gateway takes requests through &#x2F;proxy, checks the x-api-key header and uses Redis to rate limit each caller. Each key gets 5 requests per minute, with the 6th returning a 429. Requests that pass the filter are then forwarded to the upstream service.&lt;&#x2F;p&gt;
&lt;p&gt;The part I found most interesting was using Redis expiry to handle the rate limit automatically instead of having to manage the counters myself.&lt;&#x2F;p&gt;
&lt;p&gt;It is still a small project with one route and one upstream, but it gave me a much better understanding of how API gateways and rate limiting work.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Built with:&lt;&#x2F;strong&gt; Java 21, Spring Boot, Redis, Maven&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
