Twitxy Saved

Ershad Kunnakkadan

Verified account This account is verified. Learn more

@ershus

Staff Engineer @Gumroad

I help companies scale with AI, build faster, and cut infra costs. DM for consulting.
Dubai ershadk.com Joined April 2009
780 Following 5K Followers 2.4K Posts

Latest posts 5

Ershad Kunnakkadan Verified account @ershus
Found two sneaky costs in @gumroad's AWS bill:

1. Since Rails 8.1, a worker in every preview app was stuck in an OOM-kill loop, burning CPU credits
2. Our Elasticsearch client logged every request and response body: half our log volume

With cleanup: ~$1.4k/mo, ~$17k/yr saved
Ershad Kunnakkadan Verified account @ershus Oct 29
We recently migrated ~1B email analytics records at @gumroad from MongoDB to DynamoDB. Zero downtime.

Query time: 861ms → 7ms
Cost: $1,378 → $207/mo (~$14k/yr saved)

The trick: single-table design with precomputed counters. A stats page is one read, not a count per email.
View quoted post on X
9 replies 0 reposts 56 likes 2.1K views View on X
Ershad Kunnakkadan Verified account @ershus
Canon abandoned my ~10-year-old LBP2900 printer on modern Macs. Claude compiled an open-source driver, inspected raw USB bytes, tracked down a one-line memory bug, fixed it, and got the printer working again.

One of AI's best tricks: bringing old hardware back to life.

Saved the next person some trouble:
github.com/mounaiban/capt…
github.com Decode status replies by payload size, not total reply size by ershad · Pull Request #55 · mounai... download_status() passes capt_sendrecv()'s reply_size straight to decode_status(), but that size includes the 4-byte reply header while only the payload is copied into buf. An 8-byte basic ...
2 replies 1 reposts 19 likes 625 views View on X
Ershad Kunnakkadan Verified account @ershus
We recently migrated ~1B email analytics records at @gumroad from MongoDB to DynamoDB. Zero downtime.

Query time: 861ms → 7ms
Cost: $1,378 → $207/mo (~$14k/yr saved)

The trick: single-table design with precomputed counters. A stats page is one read, not a count per email.
Ershad Kunnakkadan Verified account @ershus Oct 26
Found a cost leak in @gumroad's CDN. It kept a copy of every static asset per seller domain, keyed on the Origin header, and an edge function patched CORS per request.

Fixed the cache key, swapped the function for a free header rule.

Hit rate 5% → 95%. ~$11k/year saved.
View quoted post on X
18 replies 10 reposts 243 likes 16K views View on X
Ershad Kunnakkadan Verified account @ershus
Found a cost leak in @gumroad's CDN. It kept a copy of every static asset per seller domain, keyed on the Origin header, and an edge function patched CORS per request.

Fixed the cache key, swapped the function for a free header rule.

Hit rate 5% → 95%. ~$11k/year saved.
Ershad Kunnakkadan Verified account @ershus Oct 25
Our video transcoder at @gumroad runs on Hetzner, so every video pulled from S3 was billed as internet egress: $935 last month.

Now it pulls via a signed CloudFront URL. S3 to CloudFront is free, and our private CloudFront pricing is far cheaper.

~$860/month saved, ~$10k/year.
View quoted post on X
0 replies 2 reposts 48 likes 15K views View on X
Ershad Kunnakkadan Verified account @ershus
Our video transcoder at @gumroad runs on Hetzner, so every video pulled from S3 was billed as internet egress: $935 last month.

Now it pulls via a signed CloudFront URL. S3 to CloudFront is free, and our private CloudFront pricing is far cheaper.

~$860/month saved, ~$10k/year.
Ershad Kunnakkadan Verified account @ershus Oct 25
We just moved all of @gumroad's Redis to Valkey and cut our ElastiCache bill by 69%: about $2.2k a month, or ~$27k a year.

Valkey is a drop-in fork of Redis that AWS prices 20% lower, and our app needed no code changes. Right-sizing and reserved nodes did the rest.
View quoted post on X