<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Go on vnykmshr</title><link>https://blog.vnykmshr.com/writing/categories/go/</link><description>Recent content in Go on vnykmshr</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 15 Nov 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.vnykmshr.com/writing/categories/go/index.xml" rel="self" type="application/rss+xml"/><item><title>autobreaker: adaptive circuit breaking</title><link>https://blog.vnykmshr.com/writing/autobreaker/</link><pubDate>Sat, 15 Nov 2025 00:00:00 +0000</pubDate><guid>https://blog.vnykmshr.com/writing/autobreaker/</guid><description>&lt;p&gt;The &lt;a href="https://blog.vnykmshr.com/writing/circuit-breaking-go/"&gt;circuit breaker post&lt;/a&gt; from last year used a common trigger: trip after N consecutive failures. This works when traffic is predictable. It falls apart when it&amp;rsquo;s not.&lt;/p&gt;
&lt;p&gt;At 10,000 requests per second, 10 failures is noise &amp;ndash; a 0.1% error rate. A static threshold trips the circuit on what&amp;rsquo;s essentially a healthy service. At 10 requests per second, 10 failures is total collapse &amp;ndash; 100% error rate over one interval. The same threshold that false-positives under high traffic is too slow to protect under low traffic.&lt;/p&gt;</description></item><item><title>The compiler as first reviewer</title><link>https://blog.vnykmshr.com/writing/the-compiler-as-first-reviewer/</link><pubDate>Wed, 18 Jul 2018 00:00:00 +0000</pubDate><guid>https://blog.vnykmshr.com/writing/the-compiler-as-first-reviewer/</guid><description>&lt;p&gt;When I joined, a few of us who had recently come in would skip the daily standups. Clock in, clock out, heads down. The rest of the team wasn&amp;rsquo;t sure what we were working on. This went on for a while. We were reading the existing codebase and quietly rewriting pieces in Go &amp;ndash; proving it could handle production before anyone had to commit to it.&lt;/p&gt;
&lt;p&gt;That changed when Go got formally introduced. The direction came from above &amp;ndash; Go was the language for the new services. Now it wasn&amp;rsquo;t a side experiment, it was the stack. And the PRs were coming in faster than anyone could review them all.&lt;/p&gt;</description></item><item><title>The same tree, twice</title><link>https://blog.vnykmshr.com/writing/the-same-tree-twice/</link><pubDate>Fri, 22 Sep 2017 00:00:00 +0000</pubDate><guid>https://blog.vnykmshr.com/writing/the-same-tree-twice/</guid><description>&lt;p&gt;I am building the promocode engine again.&lt;/p&gt;
&lt;p&gt;This is the second time. The first was in Node.js, at a previous company, on top of a small library called &lt;code&gt;business-rules&lt;/code&gt;. The engine worked. I thought the shape was brilliant.&lt;/p&gt;
&lt;p&gt;I am building it again in Go, from scratch, and the shape is exactly the same.&lt;/p&gt;
&lt;h2 id="the-first-time"&gt;The first time&lt;/h2&gt;
&lt;p&gt;The first promocode engine was an AND/OR decision tree. A rule had conditions in groups, groups nested inside groups, leaves that compared a fact to a value. A rule was &lt;em&gt;data&lt;/em&gt; in the database &amp;ndash; a flattened tree stored across MySQL rows &amp;ndash; but it evaluated against facts that had to be computed live.&lt;/p&gt;</description></item><item><title>Designing a wallet</title><link>https://blog.vnykmshr.com/writing/designing-a-wallet/</link><pubDate>Sun, 20 Aug 2017 00:00:00 +0000</pubDate><guid>https://blog.vnykmshr.com/writing/designing-a-wallet/</guid><description>&lt;p&gt;I&amp;rsquo;m building a wallet service in Go. Users add money from their bank, the balance sits in the wallet, and they spend it on the platform. Small payments &amp;ndash; the kind where going through a full bank authentication flow every time is more friction than the transaction is worth.&lt;/p&gt;
&lt;p&gt;The pitch is simple: top up once, spend without thinking. No OTP for every payment. No redirect to the bank&amp;rsquo;s page. One click, done.&lt;/p&gt;</description></item><item><title>Switching to Go</title><link>https://blog.vnykmshr.com/writing/switching-to-go/</link><pubDate>Wed, 07 Dec 2016 00:00:00 +0000</pubDate><guid>https://blog.vnykmshr.com/writing/switching-to-go/</guid><description>&lt;p&gt;I&amp;rsquo;d been building production services with Node.js since 2013. Custom blog engines, API services, real-time backends. The ecosystem was rich, iteration was fast, and for moderate-load services, it worked well.&lt;/p&gt;
&lt;p&gt;The limits showed up at scale. A latency-sensitive payment processing API exposed three problems that were manageable at lower traffic but compounded at higher volumes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GC pauses.&lt;/strong&gt; Node&amp;rsquo;s garbage collector introduced latency spikes that were unpredictable and hard to tune. For payment processing, where consistent response times matter more than peak throughput, this was the biggest concern. A p99 spike during a GC pause means a user staring at a spinner while their payment hangs.&lt;/p&gt;</description></item></channel></rss>