node-js-fundamentals
Node.js internals worked through by hand: streams, TCP and UDP chat, a file uploader, worker pools, semaphores, spinlocks, shared memory, and deadlocks. It led to ecity, an Express-style framework written on Node's http module.
Backend engineer. I write Go, Python, JavaScript and Rust, and I like knowing what happens one layer below the code.
Backend Developer at Coverstack in Bengaluru. Previously at Signzy and Wealthy. B.Sc. in Computer Science from BITS Pilani.
Dev servers sleep when idle and come back with a new IP. The CLI wakes the machine through the platform API, waits for the address, and opens the SSH session, so engineers stay in the terminal instead of switching to a browser to wake the server and copy its IP.
CI checks it before deploying, so two features do not land on the same server.
Moved uploads to batch processing and made the upload path faster. Recommended the read-replica setup that production now runs.
The product ran as microservices spanning Go, Python, JavaScript and Rust. Moved certificate watermarking out of the request path into a Kafka-driven Go service.
Apr 2026 to Present
Backend for an insurance platform, plus the internal tools and test infrastructure around it.
May 2025 to Dec 2025, Bengaluru
Data migration scripts with checkpointing and failure recovery, and Go APIs for an internal incident-ticketing system with email alerts.
Aug 2024 to Feb 2025, Bengaluru
A Go payment-workflow service, Google and GitHub OAuth with JWT rotation, and a Django insurance service.
We have several test servers, and each one runs our Django application on a different branch. Over time, the configuration data in their databases drifts apart. The ops team kept them in sync by hand: copy a value from one server's web interface, paste it into another's.
Well, every copy was a chance to get it wrong. Paste the wrong value, paste it into the wrong server, or just mistype it. And this happened quite often.
The tool had to run on every server, all the time, right next to an application that already uses most of the memory. I tried a Python and a Node.js sidecar for this job, and both sat at over 100 MB while doing nothing.
Reading the database directly was also out. The tool would need its own copy of the data model, plus every side effect Django runs on save. And it would break every time the application changed.
I wrote the server in Go. I benchmarked Rust too, but the difference in idle memory was too small to matter, and Go was the language I could review with more confidence. GC pauses are fine for an internal tool.
But here is the interesting part. The Go server never touches the database. Instead, it starts python manage.py shell as a child process and sends it commands over stdin. So every read and write goes through the Django ORM, and models, validation and save side effects behave the same way they do in the application.
Go handles HTTP and presentation. Python does what it already does well.
The ops team now syncs configuration between servers from one place, with no copying and pasting. And when the data model changes, the tool needs no change, because it never had its own copy.
The part I keep coming back to is a simple Unix idea: every program becomes a process, and processes can talk to each other. That one idea let two languages split the work.
I had moved our test environment to the company's in-house platform. Most routes on these test servers accept requests only from allowlisted clients and internal teams. And the internal teams run their own copies of the same application on the same platform, so they call my test servers quite often.
Here is the catch. The platform puts an app to sleep when it is idle, and every time it wakes up, it gets a new IP address. Nginx did log the IP of every request, but by the time someone read those logs, that IP could belong to a completely different app. To find out who actually held it, we had to go back to the platform, one address at a time.
So I had a simple question. What if every request was tagged with the app that sent it, at the very moment it arrived?
The obvious way was rsyslog writing straight into a Redis Stream. But the OS on these servers is fixed for application compatibility, and the rsyslog it ships with cannot write to a stream. So whatever collected the logs had to work with what the servers already had, without installing new system packages.
Nginx already had the raw data. The real work was labelling it while the IP still meant something. I first reworked the Nginx log format so each line carried what I needed, and then built a small pipeline in Go:
Because the label is attached at that moment, it doesn't matter if the app sleeps and wakes up with a new IP later. The request still points to the right app.
On top of this, I built a web UI in React where the team can filter and group the requests by app, client, route or time, instead of reading log lines.
One trade-off: Nginx sends syslog over UDP, which can drop packets. But for counting who sends traffic, losing an occasional line is fine, and Nginx never has to wait on the logger.
The very first data pointed to a source nobody had suspected. A teammate had a cron job on his laptop that kept waking his app on the platform, and every time it woke up, it called my test server. Each wake came with a new IP, so in the raw logs, one app looked like several unrelated senders. Once every request was labelled, they all showed up under the same app name. It was an honest mistake.
Now the team can see which internal apps are calling the test servers and how often, by name, even after an app has slept and come back with a new IP.
Node.js internals worked through by hand: streams, TCP and UDP chat, a file uploader, worker pools, semaphores, spinlocks, shared memory, and deadlocks. It led to ecity, an Express-style framework written on Node's http module.
Cryptography worked through in Node.js. RSA from the math up (square-and-multiply and modular inverses on BigInt), plus a one-time pad and a toy hash written by hand; then AES, HMAC, PBKDF2 and file encryption on Node's crypto module.
An HTTP server on raw TCP sockets with no framework: request parsing, routing, file serving, and concurrent connections on threads.
The platform behind my blog: an Astro and React front end, a MongoDB-backed REST API with JWT auth, and an admin panel for writing posts.