# Lavish Goyal

> Full-stack engineer at Letterdrop. Backend-leaning: queues, rate limits, slow queries, LLM agents.

Contact: goellavish10@gmail.com. [GitHub](https://github.com/goellavish10), [LinkedIn](https://linkedin.com/in/goellavish10), [X](https://x.com/lavishG10), [Résumé](https://tinyurl.com/resumelavish).

## Work

- [Rewriting a shared Redis rate limiter](https://lavishgoyal.vercel.app/work/rate-limiter): 1 in 10 requests timed out under burst, before my rewrite. Every server shared one limiter in front of a third-party API. Under burst, 1 in 10 requests timed out, and one server got 25× the turns of another. I reproduced it first with a 5-process burst test. Then I rewrote the core as one atomic Lua script that takes a slot and pops the next job in a single step. Fair turns from a random starting slot, an urgent lane for people who are waiting, timeouts that grow with the queue, and a backup provider before anything fails.
- [Cutting MongoDB spend by 55%](https://lavishgoyal.vercel.app/work/database-spend): −55% MongoDB spend. Slow queries every day, and a database bill that grew with the data. Fixed query shapes and indexes, and set retention so old data stopped riding along. Spend down 55%. Daily slow-query time down 66%.
- [Fixing a nightly MongoDB CPU spike](https://lavishgoyal.vercel.app/work/nightly-spike): 108% → 8% peak CPU, local benchmark of the fix. A read replica hit 83% CPU every night, a minute after a batch job started. Tested three suspects one at a time. Lazy loading alone barely moved it. The cause was a sort with no index behind it. A covering index plus lazy loading: 0.5 s of CPU instead of 10–12 s. Merged five hours after the alert.
- [Crash-safe job workers on Cloud Run](https://lavishgoyal.vercel.app/work/crash-safe-workers): Mid-stream where a killed worker picks back up. Long jobs ran on cloud instances that can be shut down at any moment. A kill meant starting over. Made every job record how far it got, so a fresh instance carries on from there. A killed instance resumes mid-stream instead of starting over.

## Experience

- 2024 – now, Letterdrop, Full-stack engineer. The four stories above.
- 2023 – 24, Xeno, SDE intern. Infra that took 27M+ hits in one weekend. Frontend builds 36% faster.
- 2023, ATC Couriers, Software engineer. Multi-carrier booking platform. Company acquired.
- Earlier, BookPal, Side project. Connected warehouses to couriers. Acquired.

## Side projects

- [clipshelf](https://github.com/goellavish10/clipshelf): Clipboard history in the macOS menu bar. Local only, Swift.
- [AI cost calculator](https://github.com/goellavish10/AI-API-cost-calculator-aggregator): Token costs across Claude, GPT and Gemini, cached and thinking tokens included.
- [codebase-indexing-v2](https://github.com/goellavish10/codebase-indexing-v2): Ask a codebase questions in plain English. pgvector and HNSW underneath.
- [auth-mid](https://github.com/goellavish10/auth-mid): Authentication middleware for Go.

## Freelance

- Backend and infra fixes: Slow databases, flaky jobs, runaway cloud bills.
- AI agents and LLM features: Agents and retrieval that hold up in production.
- MVP builds: Idea to shipped product, frontend and backend.
- Integrations: CRMs, payments and webhooks that survive the other side failing.

## Optional

- [Synchronous vs Asynchronous Programming in Golang](https://lavishgoyal.vercel.app/writing/synchronous-vs-asynchronous-programming-in-golang) (2023-06-27)
- [How to perform Encryption-Decryption in Web Apps](https://lavishgoyal.vercel.app/writing/how-to-perform-encryption-decryption-in-web-apps) (2023-06-24)
- [6 Reasons why student developers don't grow](https://lavishgoyal.vercel.app/writing/6-reasons-why-student-developers-dont-grow) (2022-09-12)
- [GitHub in danger because of GitHub Copilot?](https://lavishgoyal.vercel.app/writing/github-in-danger-because-of-github-copilot) (2022-07-01)
- [How did an interview help me get better at NodeJS?](https://lavishgoyal.vercel.app/writing/how-did-an-interview-help-me-get-better-at-nodejs) (2022-06-23)
- [How to start Web Development?](https://lavishgoyal.vercel.app/writing/how-to-start-web-development) (2022-06-16)
