<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Go Microservices Patterns on Atharva Pandey</title><link>https://atharva.page/series/go-microservices-patterns/</link><description>Recent content in Go Microservices Patterns on Atharva Pandey</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright ©</copyright><lastBuildDate>Wed, 18 Jun 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://atharva.page/series/go-microservices-patterns/index.xml" rel="self" type="application/rss+xml"/><item><title>Lesson 6: API Gateway Patterns — One entry point, many backends</title><link>https://atharva.page/post/go/go-micro-api-gateway/</link><pubDate>Wed, 18 Jun 2025 00:00:00 +0000</pubDate><guid>https://atharva.page/post/go/go-micro-api-gateway/</guid><description>&lt;p&gt;The first time I connected a mobile frontend directly to 11 microservices, I created 11 places for the mobile team to integrate, 11 different auth schemes to understand, 11 different error formats to handle, and a situation where a single product screen required 6 parallel API calls because the data was spread across 6 services. An API gateway solves all of this: one URL, one auth scheme, one error format, and the ability to aggregate multiple service responses into a single response the client actually needs.&lt;/p&gt;</description></item><item><title>Lesson 5: Saga Pattern — Distributed transactions without two-phase commit</title><link>https://atharva.page/post/go/go-micro-sagas/</link><pubDate>Fri, 18 Apr 2025 00:00:00 +0000</pubDate><guid>https://atharva.page/post/go/go-micro-sagas/</guid><description>&lt;p&gt;Two-phase commit is theoretically elegant and operationally painful. I&amp;rsquo;ve seen it cause system-wide deadlocks during network partitions, coordinator failures that required manual database recovery, and deployment coupling so tight that every service had to be upgraded in lockstep. The saga pattern is the alternative — it trades atomicity for availability, compensates for failures with explicit rollback actions, and keeps each service&amp;rsquo;s transactions entirely local. It&amp;rsquo;s the pattern I reach for whenever I need &amp;ldquo;all of this must succeed together&amp;rdquo; across more than one database.&lt;/p&gt;</description></item><item><title>Lesson 4: Distributed Tracing — Follow the request across 5 services</title><link>https://atharva.page/post/go/go-micro-tracing/</link><pubDate>Tue, 28 Jan 2025 00:00:00 +0000</pubDate><guid>https://atharva.page/post/go/go-micro-tracing/</guid><description>&lt;p&gt;Debugging a microservices system with only logs is like debugging a multi-threaded program with only print statements — possible, but painful in ways that are entirely avoidable. The first time I had to trace a slow request through six services using log grep, I understood why distributed tracing exists. An hour of log correlation that should have been a 10-second click on a flame chart. Distributed tracing gives you that flame chart.&lt;/p&gt;</description></item><item><title>Lesson 3: Service Discovery — Finding services without hardcoding URLs</title><link>https://atharva.page/post/go/go-micro-discovery/</link><pubDate>Wed, 06 Nov 2024 00:00:00 +0000</pubDate><guid>https://atharva.page/post/go/go-micro-discovery/</guid><description>&lt;p&gt;When I first started building Go microservices, every service had a config file with a list of URLs. &lt;code&gt;order-service-url: http://10.0.1.42:8080&lt;/code&gt;. That worked fine until the service moved, scaled out, or the IP changed during a deployment. Then the deployment would fail, someone would update the config, redeploy, and we&amp;rsquo;d write a Jira ticket to &amp;ldquo;fix the discovery mechanism eventually.&amp;rdquo; Service discovery is that fix — it&amp;rsquo;s how services find each other without hardcoding network locations.&lt;/p&gt;</description></item><item><title>Lesson 2: Inter-Service Communication — HTTP, gRPC, or events? It depends on the coupling.</title><link>https://atharva.page/post/go/go-micro-communication/</link><pubDate>Tue, 10 Sep 2024 00:00:00 +0000</pubDate><guid>https://atharva.page/post/go/go-micro-communication/</guid><description>&lt;p&gt;Every time I&amp;rsquo;ve seen a team choose their inter-service communication protocol by default — &amp;ldquo;we&amp;rsquo;ll use REST for everything&amp;rdquo; or &amp;ldquo;we&amp;rsquo;re going gRPC-native&amp;rdquo; — they&amp;rsquo;ve ended up with a transport mechanism that fights against some of their use cases. The choice between HTTP, gRPC, and event-driven messaging is a question about coupling: how tightly do these services need to be synchronized? The answer to that question selects your transport, not the other way around.&lt;/p&gt;</description></item><item><title>Lesson 1: Service Boundaries — Split by business capability, not by technical layer</title><link>https://atharva.page/post/go/go-micro-boundaries/</link><pubDate>Sat, 06 Jul 2024 00:00:00 +0000</pubDate><guid>https://atharva.page/post/go/go-micro-boundaries/</guid><description>&lt;p&gt;The most expensive architectural mistake I&amp;rsquo;ve seen teams make with microservices is splitting by technical layer instead of by business capability. I&amp;rsquo;ve seen systems with a &amp;ldquo;UserDataService,&amp;rdquo; a &amp;ldquo;UserLogicService,&amp;rdquo; and a &amp;ldquo;UserNotificationService&amp;rdquo; — three services that all have to be deployed together for any user-related feature to work, that share a database, and that call each other synchronously for every request. They&amp;rsquo;re not microservices; they&amp;rsquo;re a distributed monolith with extra network latency.&lt;/p&gt;</description></item></channel></rss>