I was supposed to be a merchant navy officer. Somewhere between learning knots and learning ropes, I found out epoll() is more addictive than actual sailing β no seasickness, and the only thing that capsizes is your prod deployment at 2 AM.
Now I'm a Software Engineer at Singularis Ventures, working on Platform, Identity & Infrastructure. I spend my days convincing three regional Keycloak clusters to agree on who a user is, and my nights convincing myself that "it works on my machine" is a valid production strategy (it is not).
- π Currently building distributed IAM, multi-region proxies, and fine-grained authorization at Singularis WoW
- π’ Also building Octaview, a B2B SaaS recruitment platform β check the org: Octaview-b2b on GitHub β
- βοΈ Currently obsessed with: WireFlow, a TCP proxy I wrote in raw C because apparently Node.js wasn't punishing me enough
- π I write about the things that broke me, on Medium
- β Ask me about auth (Keycloak/OIDC/Cerbos), distributed systems, or why your JWT is 4KB of regret
A non-blocking TCP proxy written in C using Linux
epoll, built from scratch because I wanted to know what nginx does for a living.
Single thread. Zero malloc in the hot path. Edge-triggered epoll doing the work of what would otherwise be a small army of threads complaining about context switches.
Architecture at a glance:
epolledge-triggered event loop β one thread handles every connection, no drama- O(1) fd β connection lookup via a direct-indexed
fd_to_conn[]array - Non-blocking async upstream connect with
EINPROGRESShandled properly (not vibes-based) - 8KB ring buffer per direction per connection β the garbage collector's day off
EPOLLOUT-driven buffer drain β no silently dropped partial writes- Backpressure: reads pause when the buffer's full, resume on drain
TCP_NODELAYeverywhere β Nagle's algorithm was not invitedSIGPIPEignored β dead peers get handled viaerrno, not a crash log
Baseline throughput (WSL2, loopback, Python echo backend)
| Concurrent clients | Throughput (req/s) | p50 latency | p99 latency | Errors |
|---|---|---|---|---|
| 1 | 9,173 | 80ΞΌs | 852ΞΌs | 0 |
| 10 | 17,284 | 475ΞΌs | 1,510ΞΌs | 0 |
| 50 | 25,100 | 1,320ΞΌs | 5,290ΞΌs | 0 |
| 100 | 25,012 | 2,223ΞΌs | 11,092ΞΌs | 0 |
Break-point test
| Concurrent clients | Throughput (req/s) | p50 latency | p99 latency | Errors |
|---|---|---|---|---|
| 100 | 9,464 | 5,554ΞΌs | 19,730ΞΌs | 0 |
| 250 | 9,247 | 9,046ΞΌs | 25,562ΞΌs | 0 |
| 500 | 8,777 | 9,987ΞΌs | 25,514ΞΌs | 0 |
| 1,000 | 8,547 | 10,209ΞΌs | 26,353ΞΌs | 0 |
| 2,000 | 8,659 | 10,673ΞΌs | 26,408ΞΌs | 0 |
| 5,000 | 8,235 | 10,756ΞΌs | 28,724ΞΌs | 0 |
High-load test
| Concurrent clients | Throughput (req/s) | p50 latency | p99 latency | Errors |
|---|---|---|---|---|
| 5,000 | 10,534 | 3,001ΞΌs | 9,560ΞΌs | 0 |
| 7,500 | 10,468 | 3,067ΞΌs | 9,431ΞΌs | 0 |
| 10,000 | 10,328 | 3,150ΞΌs | 9,575ΞΌs | 0 |
| 12,500 | 10,374 | 3,081ΞΌs | 9,639ΞΌs | 0 |
| 15,000 | 9,835 | 3,198ΞΌs | 10,920ΞΌs | 0 |
Zero connection errors up to 15,000 concurrent clients. p99 stayed under 11ms across the entire range. The real bottleneck was Python's GIL on the echo backend β WireFlow was just standing there, arms crossed, waiting for it to catch up.
make && ./build/wireflow
python3 benchmarks/backend.py # start echo backend
python3 benchmarks/bench.py # baseline
ulimit -n 65536 && python3 benchmarks/breakpoint2.py # break-point testWhat building it actually taught me: why epoll edge-triggered mode demands you drain to EAGAIN or it will silently hate you forever, why O_NONBLOCK isn't optional with EPOLLET, how proxies bidirectionally map client_fd β upstream_fd, why a blocking accept() quietly kills your concurrency, how ring buffers survive partial reads/writes without a single malloc, and how to actually read a p99 instead of just screenshotting it for a slide.
Building the platform, identity, and infrastructure layer for Singularis WoW:
- Multi-region IAM β three regional Keycloak clusters, realm-based tenant isolation, one Security Interface pretending it's all simple
- Cerbos-backed authorization β RBAC/ABAC/PBAC over gRPC, because a JWT with your entire permission tree in it is a war crime
- Zero Trust API Gateway β JWT validation, rate limiting, structured audit logging
- Multi-region streaming proxy β request streams piped end-to-end, GDPR-compliant, constant memory, no buffering entire payloads like some kind of animal
- Federated schema-driven API β one endpoint, many regions, no one downstream knows the difference
- Multi-tenant portfolio platform β Keycloak for identity, PostgreSQL/Prisma for domain data
- AI-powered MDM β vector embeddings + semantic scoring to stop duplicate garbage data from reaching the database
- LLM resume microservice β event-driven, IBM Granite-powered, actually understands a resume better than most humans skimming one in six seconds
- Pluggable storage engine β provider-agnostic streaming + presigned URLs, EventBridge-driven lifecycle events
| Project | What it is |
|---|---|
| WireFlow | Non-blocking epoll-based TCP proxy in C β 15,000 concurrent clients, zero errors |
| Octaview | B2B recruitment SaaS β WebRTC interviews, CRDT collaborative code editor, self-managed Judge0 execution cluster |
| Loggasm | Express logging & error-handling middleware, published on NPM |
If it's not observable, it's not deployed. If it's not authorized, it's not secure. If it's not documented, it's not my problem past 6 PM.
