Farhan Ali Khan
Software Engineer and Problem Solver · Storage, Distributed Systems and AI Agent Memory
The PDF lists the same work history in plain text, formatted for applications.
About me
I'm a software engineer and problem solver with 13 years of building products, at startups (SurrealDB, Codenotary, GreedyGame, HapPay) and at large companies (VMware, Cisco, TCS). I like problems that have a person attached: a customer whose queries are slow, a team whose upgrades keep breaking, a system that falls over under load. I find out who is affected and why, work back to the cause from first principles, and stay with the fix until it holds up in production. Most recently I led the storage effort at SurrealDB, where I built its key-value storage engine and worked on its agent memory product.
Leadership and range
- I led the storage effort at SurrealDB, the data engineering effort at GreedyGame and the infrastructure side at HapPay. At Cisco and VMware I mentored engineers and tightened how the team reviewed and tested code.
- Four of my seven employers were startups, where one engineer often owns a system from design to on-call. VMware, Cisco and TCS brought scale, compliance rules and a more formal process.
- I've worked close to the people using what I build. At HapPay I dealt directly with end customers. At GreedyGame I built the dashboards the business used to decide what to run. At VMware I was on call for the platform's tenants.
- The domains changed a lot: enterprise software, payments, ad tech, networking, cloud platforms, databases and now memory for AI agents. Each time I learned the foundations first and chose tools after.
How I work
I start by asking who is stuck and what "fixed" would look like to them. Then I go down to first principles: what the system has to guarantee, where the time actually goes, and which constraints are real and which are just how it has always been done. Tools come last. Sometimes the answer is a new storage engine. Often it is a simpler design or a different data layout that nobody tried because the old way worked well enough.
I like to build on foundations I understand. When a problem needs gossip membership, real-time bidding or distributed transactions, I read the original papers and write a small version myself before depending on someone else's. That's why my GitHub has so many small implementations of systems papers, and it's how I've moved between industries without starting from zero.
For systems where a bug means lost or wrong data, I treat correctness as its own discipline, verification engineering. It begins with writing down what must always be true. A model checks the design before any code exists (TLA+), the critical pieces get proofs (Kani, Verus), and the rest is tested with property-based tests, mutation tests and deterministic simulation testing (DST). DST runs a whole system from one random seed, so any failure it finds can be replayed exactly. AI coding agents fit inside this loop: they write code fast, and the checks decide whether it's right.
I see leading as owning the outcome with the team. That means agreeing priorities with product and customers, clearing blockers, reviewing carefully, and being around when something breaks in production.
What I want to work on
- Problems with real users attached, where the fix shows up as a faster query or an upgrade people stop dreading.
- Distributed systems and storage: key-value stores, transactions, replication, and databases that keep their data in object storage.
- Ontologies and agent memory: defining what an entity and a fact are, so that many AI agents can share one consistent memory.
- Verification engineering for AI-assisted development: models, proofs and simulation as the checks that let agents help build systems that must stay correct.
- Small teams that own a problem end to end, from the customer conversation to production.
Skills
Leadership and product: team leadership, technical ownership, working directly with customers, product thinking, cross-team collaboration, mentoring, design and code review
Storage engines: LSM tree, B+ tree (copy-on-write), key-value stores, RocksDB, write-ahead log (WAL), compaction, adaptive radix tree (ART)
Distributed systems: Distributed transactions (TAPIR), Raft, Viewstamped Replication, SWIM gossip membership, CRDTs, consistent hashing, replication
Cloud and object storage: Object storage, lakebase architecture, caching, data retention
Performance: Performance optimisation, low-level Rust optimisation, in-memory data structures
Verification and testing: Formal methods: TLA+, Kani model checker, Verus; property-based testing, mutation testing, deterministic simulation testing (DST)
AI and agents: Agent memory, ontology design, fact and entity modelling, AI coding agents (Claude Code)
Platform and infrastructure: Kubernetes operators, multi-cluster federation, multi-tenancy, SRE and on-call, Docker, Terraform, Consul, Prometheus, Grafana, ELK, gRPC, AWS, Google Cloud (GCP)
Backend and data: real-time bidding (RTB), high-throughput APIs, RBAC, third-party and ERP integrations, caching (Redis, Aerospike), Kafka, BigQuery, Elasticsearch, Parquet, Cap'n Proto, data pipelines, data lakes
Languages and databases: Rust, Go, Python, SQL, SurrealQL; RocksDB, PostgreSQL, MySQL, Redis, Aerospike
Experience
SurrealDB · Senior Software Engineer, Storage Team Lead
Jun 2023 to Oct 2026Database startup: a multi-model database (document, graph, vector). Led the storage effort.
Storage engines and team
- Led the storage effort, working on optimisations and on what the company needed from storage.
- Built SurrealKV, an LSM-tree key-value store in Rust, from scratch, and made it performant.
- Worked on a copy-on-write B+ tree key-value store, built internally for our use case.
- Worked on performance improvements in RocksDB and at the storage-engine level.
- Did low-level optimisation on in-memory Rust crates such as vart (a versioned adaptive radix trie) and several others.
Distributed and cloud storage
- Added object storage support on top of our LSM engine, to build a lakebase architecture for the company's growing needs.
- Worked on our distributed transactional store, built on the TAPIR paper (Zhang et al., SOSP 2015), and did deterministic simulation testing (DST) across our internal products.
More on TAPIR
TAPIR, the Transaction Application Protocol for Inconsistent Replication (Zhang et al., SOSP 2015), builds linearizable distributed transactions on replication that gives no consistency guarantees of its own. Consistency is enforced only at the transaction layer, which removes coordination from the replication layer.
AI and agent memory
- Worked on SurrealDB's agent memory product.
- Worked on understanding facts and entities and the logic around them, and on defining ontologies for the product.
- Used an agentic workflow with TLA+ modelling before writing code, then Kani checks, Verus proofs, and property and mutation testing.
More on agent memory and ontologies
The A-MEM paper (Xu et al., NeurIPS 2025) is related research on agent memory. It stores each memory as a note with its content, keywords, tags, a short context and an embedding, links related notes, and lets a new memory update older notes.
An ontology says which kinds of entities exist, which relations can hold between them, and which rules a fact has to follow. Defining one for the product gives facts and entities a structure to map onto, which keeps memory consistent as more is added.
Codenotary · Software Engineer (Consultant), immudb
Aug 2022 to May 2023 · RemoteStartup. immudb: open-source immutable database with cryptographic (Merkle tree) verification; tamper-resistant and auditable.
- Worked on data retention, implementing efficient deletes in the database, where proofs and storage are interlinked.
- Worked on compaction and on improving key-value store performance.
- Developed new features, maintained core components and tested the database.
- Engaged with the immudb community.
VMware · Senior Software Engineer, VMware Developer Platform
Apr 2021 to Jul 2022 · BangaloreLarge company. Internal developer platform running many Kubernetes clusters with thousands of nodes under PCI, HIPAA and FedRAMP High compliance, with separate clusters for development, staging, production and sensitive workloads across data centres.
- Built Kubernetes operators for the platform, including an operator for multi-cluster management across clouds that gave tenants Kubernetes federation and multi-tenancy.
- Designed and built a self-service model for platform-managed services: tenants deploy curated Kubernetes apps (Kafka, Vault, the Prometheus monitoring stack) with the team's deployment practices built in, instead of installing and running each one from scratch.
- Managed platform releases through a Kubernetes-native release operator built by the team.
- Took SRE on-call shifts, which showed where tenants struggled and kept me hands-on with their issues.
- Introduced an end-to-end (E2E) testing framework and behavioural tests written from the tenant's point of view, so operators were tested before tenants used them.
- Improved the team's peer code review process to raise code quality and collaboration.
Cisco · Senior Software Engineer, Secure Threat Services
Apr 2019 to Apr 2021 · BangaloreLarge company. Containerised firewall service that automates network operations and monitors customer networks, with fast router onboarding and near real-time configuration updates.
- Worked on moving firewall deployments from a centralised architecture to a decentralised peer-to-peer one, with a Go management layer running alongside the Snort firewall on each router.
- Researched group membership algorithms and built a gossip-based membership mesh across routers on SWIM (Scalable Weakly-consistent Infection-style Process Group Membership), using HashiCorp memberlist.
- Built an in-memory shared key-value store for configuration and version updates, gossiped across the cluster and ordered with Lamport clocks.
- Designed a more robust successor that models the data as CRDTs (conflict-free replicated data types) to remove clock-skew problems.
- Built core STS services: designed the gRPC APIs, coordinated with other teams, planned deployment strategies for testing the distributed setup, and guided the team on concurrent Go, design patterns and testing strategy.
GreedyGame · Senior Software Engineer, Data Engineering Lead
Jun 2017 to May 2019 · BangaloreAd-tech startup: an ad platform for mobile games serving more than 500 million ad requests a day. Led the data engineering effort and worked closely with business and operations teams.
Ad serving
- Designed the real-time bidding (RTB) protocol: each request broadcasts bid requests to bidders (AdMob, Kraken, Facebook and others), evaluates responses, notifies the winner and serves the ad markup.
- Researched RTB papers and designed an asynchronous flow that prepares ads for subsequent requests, keeping every response under 500 ms.
- Set up the microservice infrastructure on Google Cloud (Kubernetes, Terraform, Consul) with a caching layer on Redis and Aerospike.
- Reduced infrastructure spend through algorithm and caching optimisations while holding the latency target.
- Built the monitoring stack (Prometheus, Grafana) with real-time cache dashboards the business used for scaling decisions. Slides: Ad serving platform using Redis (RedisConf 2018).
Data engineering (lead)
- Led the data engineering effort: built the company's first data pipelines on Kafka and BigQuery, ingesting more than 2 TB a day.
- Converted raw gzipped data to Parquet and Cap'n Proto to make transfers cost-effective, and optimised BigQuery queries with the data team.
- Cached query results in Redis data structures for faster queries; optimised Aerospike queries and cost, giving the operations team data to choose which campaigns to run during the day.
- Built BigQuery dashboards that surfaced errors in the Android SDK.
- Set up a highly available MySQL cluster on GCP with replication and backups for critical data, and a data lake on Amazon Glacier with pipelines for querying historical data.
HapPay · Senior Software Engineer, Infrastructure Lead
Oct 2015 to May 2017 · BangaloreFintech startup: a corporate expense management product. Led infrastructure and worked directly with customers.
- Worked directly with end customers.
- Designed and built role-based access control (RBAC), a core feature that manages the hierarchy of users in each customer organisation.
- Built and managed integrations with third-party APIs, and the public API HapPay exposed to partners (Dunzo integrated with it in 2016).
- Built accounting integrations that sync customers' expenses into SAP, Oracle, QuickBooks, Tally and other ERP tools.
- Built an engagement workflow engine (DAG / state machine) to track the customer lifecycle, scaling the in-house streaming pipeline, Elasticsearch and scheduler.
- Led infrastructure for the product: Docker and AWS, log management and analysis across services on the ELK stack, and scaling, monitoring and migrating the critical MySQL and PostgreSQL databases.
Tata Consultancy Services · Associate Software Engineer
Jul 2013 to Aug 2014 · Bangalore- Built custom SharePoint 2013 and 2010 solutions in Visual Studio for enterprise clients: web parts, site definitions, designer workflows, event receivers and timer jobs, with HTML5, CSS3 and JavaScript.
- Customised client applications with the server and client object models, delivered enhancements and change requests, and debugged critical defects.
Open source and writing
- Engineering blog: build logs on deterministic simulation testing for a distributed transactional KV store, git-style branching in an LSM tree, a filesystem on a database, and cluster membership protocols.
- Implementations of systems papers in Go and Rust: flashdb (embedded key-value database), chord (Chord DHT), art (adaptive radix tree), merkletree (RFC 6962 proofs), xring (consistent hashing with bounded loads), vsr (Viewstamped Replication).
Education
B.Tech, SRM University, Chennai · 2009 to 2013