Writing
Databases, distributed systems, Go, Linux, and lessons from building companies.
2026
2025
2023
- Enabling Remote Access to PostgresTo allow Postgres connections from a remote server, or from within a docker container, you'd want to allow it to listen to external traffic. This requires doing two settings, one in
- ChatGPT Aces Indian BureaucracyToday, after visiting VFS office to apply for my child's Overseas Citizen of India document, I was turned back because I didn't provide both the parents' documents, just mine.
- Innovation: It’s About Your Effort and Time, Not Your Hair on FireA few months ago, I was talking about an exciting new product with a friend. As I described the efficiencies this product could offer, my friend remarked: "Sure, it saves some time. But is it addressing a 'hair on fire' problem?"
- Shared Non-ResponsibilityAs companies become bigger, the "shared non-responsibility" expands vastly -- where no one in particular is fully responsible, because someone else is responsible for a portion.
- Securing Your Origin Server by Automating UFW Rules for Cloudflare IPsIf you're using Cloudflare to manage traffic to your origin server, you might want to restrict incoming traffic to only come from Cloudflare. This is crucial for protecting your origin server from potential unauthorized access. A handy…
- Running PostgreSQL on Ubuntu as non-Postgres User: The Definitive GuideWe're running Postgres for the production deployment of Struct, a (not-yet-launched) chat platform we're building to deal with the disorganized chaos of live communication. I'm using PostgreSQL to store the data -- which I have started to…
- TIL: Go Response Body MUST be closed, even if you don’t read itSearching online, the overwhelming consensus was that there must be a unclosed http.Response Body. Now, I was under the impression that you only need to close the response body, if you read it. If you didn't read it, then there's no need…
- Postgres 15 on Encrypted ZFS and Ubuntu 22.04 LTSI'm using Postgres for my new startup. The startup is still in stealth mode, so I can't talk about it much. But, given the focus of the startup is on communication platforms, Postgres made a lot of sense. This is the first time I've ever…
- Detailed Guide to Setting Up ZFS RAID on Ubuntu 22.04In a previous post, I showed how to put together a cheap load balancer server for $500. I later had an idea to use that server for storage too. Storage servers don't need much CPU, just a lot of disk space. And this one had very little…
- How ChatGPT won over Google todaySpent the last hour wrecking my head against an npm error, trying search after search with Google, leading nowhere.
2022
- Launching 0xFast: 10x Faster, 3x Cheaper Web3 API PlatformToday, I'm excited to launch https://www.0xfast.com -- A 10x Faster, 3x Cheaper Web3 API Platform, with a mission to "Make Web3 Experience Fast".
- Comparing Compression Algorithms for Moving Big DataIn a previous post, I wrote about the best way to transfer a directory across the network.
- How to increase open file limits on Ubuntu 22.04
- Tranfer a Giant Directory across NetworkDealing with huge web3 data, I see myself doing this a lot: moving data directories across machines. In this case, we have a 250 GB directory with 10K files. The network connection between machines is ~5 MBps. But using these techniques…
- HTTPS Reverse Proxy: Caddy outperforms NGINX 4xIn my setup, where I have an HTTPS load balancer, sending traffic over HTTP to the server, aka reverse proxy, Caddy outperforms NGINX by 4x.
- Share One IP Across Servers with KeepalivedAs you might have picked up, I run baremetal servers. They provide the best performance-to-cost ratio. A problem I've been trying to solve for some time now has been to securely expose a performant service, which is load-balanced across a…
- 0xFast Streams: Parsed LogsTL;DR: You can now pass log.parse=true as a URL parameter to get human-readable parsed event logs from 0xFast Stream.
- 0xFast Indexed Streams: Search Blockchain at the Speed of LightI'm excited to announce the launch of Indexed Blockchain Streams at 0xFast. What are indexed streams, you ask? Indexed Streams build an index on top of the Blockchain Stream, to allow searching within and streaming blocks, transactions…
- Top 1% Smart Contracts Generated 96% of all Ethereum Logs — an Analysis via Bash ScriptingLooking at this log, it all seems strange. Address, topics, data -- what are all these things? There are plenty of posts online to explain what these fields are, so I won't go too much deeper into it. But, to summarize:
- Launching 0xFast Stream: 100x Faster Ethereum Block Downloads
- Nginx with Let’s Encrypt SSL CertsI won't go into details here. This tutorial does a good job: https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/
- Retrospection and Learnings from Dgraph LabsIt's been almost nine months since I left Dgraph Labs, a company that I spent 6 years of my life building -- after a layoff followed by a failed Series B round (unsurprisingly, and in that order).
- Building a 2.5 Gbps Load Balancer Server for $500I put together a build for a 2.5 Gbps server, which can run Nginx and act as a load balancer for my other servers. Here's all the parts in pcpartpicker:
- Adding Unique IDs to Transaction Logs in Polygon using JQI'm working on serving Polygon data via Outserv. As part of the process, I downloaded the first 15 million Polygon blocks and stored them as JSON. To avoid any duplicates while loading this data into Outserv, each object in JSON has a…
- Web3 Cloud Moral Dilemma
- How to Parse an EVM Smart Contract in GoI was recently looking for a working solution to parsing Smart Contracts in the EVM chains. I couldn't find a simple to follow, working solution based on Go. This post aims to fill that gap.
- How To Set Up Linux RAID On Ubuntu 22.04Update (Sep 14, 2022): I've switched to using ZFS because it has checksums for every block -- I can't imagine trusting a storage without checksums. [This blog post][zfs] covers how to setup ZFS and switch away from mdadm.
- Creating a Bootable Disk on UbuntuThis would search for ISO files in Downloads, and show you the USB stick that's plugged in. You can then follow the interface to create a bootable disk.
- Decentralization or API Keys? Pick One
- A chat with OpenSea API ScammerI posted in the OpenSea discord channel that I need help with getting OpenSea API key so I can write an importer for Outserv. And I got pinged by 0xEider. Yes, 0xEider is part of OpenSea community team.
- Introducing Outserv: Blockchain Search with GraphQLToday, I'm excited to announce the launch of Outserv -- a GraphQL-powered Blockchain Search Engine. Outserv enables you to run production-grade GraphQL Search APIs over any blockchain data 10x faster than existing mechanisms.
- Fixing the Broken Open Source Funding Model with Sustainable LicenseOpen source is built on the principles of transparency, participation and collaboration. And open source software is thriving. It's everywhere. Every decently complex software is using some open source software underneath.
- Sustainable License Version 1.0
- Sustainable License: Frequently Asked Questions
- UDS vs FIFO vs TCP for IPC in Go and Linux
- The Obesity CodeI read The Obesity Code by Dr. Jason Fung. Since reading the book, I’ve been following an 18:6 fasting, where I eat between 9a-3p and fast all other hours, every day.
- Fiduciary Duty to a “Professional CEO”
- Autocomplete with Vim-Go and Neovim in 2022Vim-Go uses gopls for autocompletion. By default, it relies on Ctrl-x Ctrl-o to trigger it. To trigger it automatically in Neovim, use Deoplete.
- Takeaways from Rework by Jason, DavidAs I read this book, I took notes. These are the ones which really appealed to me.
- VCs Fund Ideas, Not ExecutionMy founder journey started in 2014. I have pitched to hundreds of investors and raised 15M for my last startup, taking it from 0 to $1M ARR. My startup was in the graph database field. And I frequently wondered why other database companies…
- How I got my first computerI saw a computer for the first time in 6th grade. The year was 1996. My uncle was a lecturer at the local government polytechnic and hoped that my brother, who was in the 10th grade, would join it. So, he invited him to come to check out…
2021
2020
- High Performance Manual Memory Management in Go
- [Archive] Why Dgraph is Shutting Down SlackThis blog post was originally posted on Dgraph Blog. Since it was taken down, I recreated it from [Wayback Machine][wayback] and the corresponding [Discourse post][disc-post].
- Back to GraphQL Talk at GraphQL Asia 2020
2018
2017
2016
2007
- University Time BlogI used to blog frequently during my university days at NTU, Singapore (2003-2007). After having forgotten about it for over a decade, the blog is still alive. Contains various posts about coding, intern life at Google, Flickrfs and life in…
- Desktop Flick OrganizerDesktop Flickr Organizer (DFO) allowed online/offline mode management of Flickr photos providing more functionality than was possible via Flickr's Web Interface.
2005
No posts match that filter.