<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nayan Rathod</title>
    <description>The latest articles on Forem by Nayan Rathod (@nynrathod).</description>
    <link>https://forem.com/nynrathod</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3881690%2Fbfc7276b-4dc3-4990-bee2-5119a0903978.png</url>
      <title>Forem: Nayan Rathod</title>
      <link>https://forem.com/nynrathod</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nynrathod"/>
    <language>en</language>
    <item>
      <title>I benchmarked my compiled language against Node.js, Go, and Python. 1.34 million requests per second is not a typo.</title>
      <dc:creator>Nayan Rathod</dc:creator>
      <pubDate>Wed, 22 Apr 2026 13:00:00 +0000</pubDate>
      <link>https://forem.com/nynrathod/i-benchmarked-my-compiled-language-against-nodejs-go-and-python-136-million-requests-per-80g</link>
      <guid>https://forem.com/nynrathod/i-benchmarked-my-compiled-language-against-nodejs-go-and-python-136-million-requests-per-80g</guid>
      <description>&lt;p&gt;Last week, I published an article about building Doolang, a compiled language I made specifically to eliminate API boilerplate. At the end, I dropped a number: &lt;strong&gt;1.34M RPS&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I got the same question in at least a dozen DMs: &lt;em&gt;"Okay but where's the actual proof?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Fair point. Throwing out a benchmark number in a sentence and moving on is exactly the kind of thing that deserves skepticism. So I set up a proper environment, ran it against real comparisons, and I'm going to show you the full picture, including the parts that didn't look great.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Doolang is (60-second version)
&lt;/h3&gt;

&lt;p&gt;If you didn't read the &lt;a href="https://dev.to/nynrathod/i-got-tired-of-writing-the-same-200-lines-of-boilerplate-for-every-api-so-i-built-a-compiled-ie5"&gt;first article&lt;/a&gt;, here's the short version: Doolang is a compiled, statically typed language I built in Rust with an LLVM backend. You define a data schema, the compiler generates your REST endpoints, auth, validation, and rate limiting. No garbage collector, no JIT, no interpreted layer. No magic strings. Just a native binary.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://doocloud.dev" rel="noopener noreferrer"&gt;DooCloud&lt;/a&gt; is the deployment layer I built on top. Schema to live API in one click. But this article is purely about the HTTP layer performance of that compiled binary.&lt;/p&gt;

&lt;h3&gt;
  
  
  The benchmark setup
&lt;/h3&gt;

&lt;p&gt;Tool: &lt;a href="https://github.com/wg1996/wrk" rel="noopener noreferrer"&gt;wrk&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wrk &lt;span class="nt"&gt;-t10&lt;/span&gt; &lt;span class="nt"&gt;-c900&lt;/span&gt; &lt;span class="nt"&gt;-d30s&lt;/span&gt; http://localhost:PORT/endpoint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;10 threads, 900 concurrent connections, 30-second duration&lt;/li&gt;
&lt;li&gt;Both plain text and JSON response endpoints&lt;/li&gt;
&lt;li&gt;All servers running locally, no network latency&lt;/li&gt;
&lt;li&gt;Each server cold-started fresh before each run&lt;/li&gt;
&lt;li&gt;Results averaged across 3 runs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All scripts are reproducible and publicly available: &lt;a href="https://github.com/nynrathod/doo-benchmark" rel="noopener noreferrer"&gt;github.com/nynrathod/doo-benchmark&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I tested against:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Doolang&lt;/strong&gt; - native compiled binary, LLVM backend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go&lt;/strong&gt; - &lt;code&gt;net/http&lt;/code&gt; standard library, no framework&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node.js&lt;/strong&gt; - Fastify (the fastest mainstream Node HTTP framework)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt; - FastAPI + uvicorn&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Plain text results
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stack&lt;/th&gt;
&lt;th&gt;RPS&lt;/th&gt;
&lt;th&gt;Avg Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Doolang&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1,344,989&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.71ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go (net/http)&lt;/td&gt;
&lt;td&gt;759,812&lt;/td&gt;
&lt;td&gt;1.72ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fastify (Node.js)&lt;/td&gt;
&lt;td&gt;48,457&lt;/td&gt;
&lt;td&gt;15.84ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FastAPI (Python)&lt;/td&gt;
&lt;td&gt;4,268&lt;/td&gt;
&lt;td&gt;201.17ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  JSON results
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stack&lt;/th&gt;
&lt;th&gt;RPS&lt;/th&gt;
&lt;th&gt;Avg Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Doolang&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1,294,430&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.66ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go (net/http)&lt;/td&gt;
&lt;td&gt;572,000&lt;/td&gt;
&lt;td&gt;2.26ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fastify (Node.js)&lt;/td&gt;
&lt;td&gt;46,291&lt;/td&gt;
&lt;td&gt;21.81ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FastAPI (Python)&lt;/td&gt;
&lt;td&gt;4,406&lt;/td&gt;
&lt;td&gt;196.01ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9cdilf8bu9p1psdv2oh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9cdilf8bu9p1psdv2oh.png" alt=" " width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What explains this gap
&lt;/h3&gt;

&lt;p&gt;The gap isn't configuration. It's structural.&lt;/p&gt;

&lt;p&gt;Doolang's HTTP layer is built on hyper-rs and tokio, Rust's async runtime. There's no garbage collector, no JIT, and no interpreted layer. But it's not 'zero runtime', tokio is a runtime. What it is: a minimal, compiled, zero-GC stack with no framework overhead on top.&lt;/p&gt;

&lt;p&gt;Go is fast. Node.js with Fastify is fast for JavaScript. But they both have runtimes. Doolang doesn't. Every framework and managed language is paying a tax at the OS boundary that a native binary doesn't.&lt;/p&gt;

&lt;p&gt;Go's &lt;code&gt;net/http&lt;/code&gt; can be pushed higher with tuning. I've seen 250K+ out of it. The gap would still be around 7x. That ratio doesn't move much because the constraint is architectural, not configurational.&lt;/p&gt;

&lt;h3&gt;
  
  
  The honest caveats - I'd rather say these than have someone else say them
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. This is a micro-benchmark.&lt;/strong&gt; Plain text and simple JSON, no database calls, no business logic, no auth middleware processing. In a real application, your bottleneck is almost always your database or I/O, not raw HTTP throughput. If you're waiting 20ms on Postgres, a 10x faster HTTP layer saves you 0.29ms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Local-only.&lt;/strong&gt; No network hops, no SSL, no load balancer. Production adds latency. The absolute numbers in production will be lower; the ratios remain similar.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. I built Doolang. I am not a neutral party.&lt;/strong&gt; I ran everything the same way, same wrk setup, same endpoint behavior, no tuning tricks on any single server. But you should run it yourself. The &lt;a href="https://github.com/nynrathod/doo-benchmark" rel="noopener noreferrer"&gt;doo-benchmark repo&lt;/a&gt; has everything. If you find a flaw in the methodology, I want to know.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this matters beyond the headline number
&lt;/h3&gt;

&lt;p&gt;I'm building DooCloud for early-stage product teams, mostly founders building AI-backed products who need a backend layer that doesn't need a DevOps hire. The performance story is relevant here for a non-obvious reason.&lt;/p&gt;

&lt;p&gt;Most early products don't hit performance walls on HTTP throughput. But having headroom means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You start on a smaller, cheaper server and stay there longer&lt;/li&gt;
&lt;li&gt;Your API layer never becomes the bottleneck, so your Python AI backend becomes the optimization target (which is correct)&lt;/li&gt;
&lt;li&gt;You scale vertically for longer before needing to add nodes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The numbers aren't a flex. They're a cost reduction argument for the first 6-18 months of a product's life. A 7x faster API layer on half the compute costs real money when you're pre-funded.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I haven't benchmarked yet
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;WebSocket throughput under concurrent connections&lt;/li&gt;
&lt;li&gt;Mixed load (concurrent complex and simple requests)&lt;/li&gt;
&lt;li&gt;Memory footprint under sustained load over hours&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are in progress. I'll post the results when they're done.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run it yourself
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://github.com/nynrathod/doo-benchmark" rel="noopener noreferrer"&gt;doo-benchmark repo&lt;/a&gt; has wrk scripts for everything above. Clone it, run it on your machine, and tell me what numbers you get.&lt;/p&gt;

&lt;p&gt;If my methodology is wrong, put it in the comments. I mean that.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Doolang compiler (open source): &lt;a href="https://github.com/nynrathod/doolang" rel="noopener noreferrer"&gt;github.com/nynrathod/doolang&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Schema to live API: &lt;a href="https://doocloud.dev" rel="noopener noreferrer"&gt;doocloud.dev&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rust</category>
      <category>programming</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I got tired of writing the same 200 lines of boilerplate for every API, so I built a compiled language to eliminate it</title>
      <dc:creator>Nayan Rathod</dc:creator>
      <pubDate>Thu, 16 Apr 2026 13:00:00 +0000</pubDate>
      <link>https://forem.com/nynrathod/i-got-tired-of-writing-the-same-200-lines-of-boilerplate-for-every-api-so-i-built-a-compiled-ie5</link>
      <guid>https://forem.com/nynrathod/i-got-tired-of-writing-the-same-200-lines-of-boilerplate-for-every-api-so-i-built-a-compiled-ie5</guid>
      <description>&lt;p&gt;Every side project I start does the same thing to me. New idea. Open editor. Spend 2-3 days on things that had nothing to do with the idea itself. Setting up auth, writing CRUD handlers I'd written a hundred times, configuring Docker, wiring up CORS, writing validation logic, setting environment variables, pushing to a repo, figuring out deployment.&lt;/p&gt;

&lt;p&gt;By the time I was done with the setup, I'd lost momentum on the actual product.&lt;/p&gt;

&lt;p&gt;I tried every shortcut. Supabase. Firebase. Express boilerplates. They either locked me into someone else's decisions, added runtime overhead I couldn't control, or still required too much manual wiring.&lt;/p&gt;

&lt;p&gt;So I did the unreasonable thing.&lt;/p&gt;

&lt;p&gt;I spent 7 months building a compiled, statically typed programming language from scratch. Specifically designed so that your data schema is your API definition. There were at least three weekends where I was convinced I'd built the wrong abstraction entirely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I built and why&lt;/strong&gt;&lt;br&gt;
The language is called &lt;strong&gt;Doolang&lt;/strong&gt;. I built the compiler in Rust using LLVM (via Inkwell). The core idea: if the type system understands your data model at compile time, the entire API layer, endpoints, validation, auth, rate limiting can be generated automatically. No runtime reflection. No magic strings. Just a compiler that knows what your API should look like before you do.&lt;/p&gt;

&lt;p&gt;Here's the entire definition for a production-ready User API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That generates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;POST /tasks
GET /tasks
GET /tasks/:id
PUT /tasks/:id
DELETE /tasks/:id
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With JWT authentication, CORS handling, and rate limiting already wired in. No config needed.&lt;/p&gt;

&lt;p&gt;The compiled binary benchmarks at &lt;strong&gt;1.3+M RPS for plain text and 1.2+M RPS for JSON&lt;/strong&gt; responses. That's not a toy. &lt;a href="https://github.com/nynrathod/doo-benchmark" rel="noopener noreferrer"&gt;Benchmark repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then I built the deployment layer&lt;/strong&gt;&lt;br&gt;
A fast language that still requires you to manage Docker, DNS, Git, and cloud infrastructure isn't solving the real problem. So I built &lt;strong&gt;DooCloud&lt;/strong&gt; on top of Doolang.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Push to DooCloud

=== Deploy started: my-api ===
Generating code...
Provisioning database...
Building...
Deploying service...
Domain live: my-api-abc123.doocloud.dev

✓ Deployed to https://my-api-abc123.doocloud.dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That deployment handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git commit and push&lt;/li&gt;
&lt;li&gt;Docker build&lt;/li&gt;
&lt;li&gt;Container deployment on Cloud&lt;/li&gt;
&lt;li&gt;SSL certificate&lt;/li&gt;
&lt;li&gt;Custom domain routing&lt;/li&gt;
&lt;li&gt;Environment variables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The whole flow schema definition to live production API takes under 5 minutes. I've timed it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What this actually looks like&lt;/strong&gt;&lt;br&gt;
There's a live interactive playground on &lt;a href="https://www.doocloud.dev/#playground" rel="noopener noreferrer"&gt;doocloud.dev&lt;/a&gt; where you can define structs and see the generated Doolang code and API endpoints in real time. No signup needed. If you want to actually deploy it, there's a free tier.&lt;br&gt;
The Doolang compiler is fully &lt;a href="https://github.com/nynrathod/doolang" rel="noopener noreferrer"&gt;open source on GitHub&lt;/a&gt;. 7+ months of active development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learned building a language to solve a deployment problem&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1. The language design forces good API design.&lt;/strong&gt; Because your schema is your contract, you can't accidentally build inconsistent endpoints. The compiler rejects ambiguity.&lt;br&gt;
&lt;strong&gt;2. Native binaries solve a class of problems people have accepted as normal.&lt;/strong&gt; Most API frameworks are interpreted or JIT-compiled. The performance ceiling is set by the runtime. With a compiled binary, you're talking to the OS directly. 1.3+M RPS on my local machine. No special optimization. That's just what you get when there's no runtime in the way.&lt;br&gt;
&lt;strong&gt;3. The hardest part wasn't the compiler. It was resisting scope creep.&lt;/strong&gt; I caught myself planning a query language, a graph layer, and realtime sync. Then I stopped and shipped instead. Building a language makes you want to solve every problem with the language. The MVP discipline had to be applied to the language itself, not just the product.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I genuinely want feedback on&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm one person. This is live.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the schema → auto-generated API abstraction feel right, or does it feel like too much magic?&lt;/li&gt;
&lt;li&gt;What's the first thing you'd try to break about this approach?&lt;/li&gt;
&lt;li&gt;What's missing that would stop you from trying it for a real project?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Be mean, I can take it. That's actually why I'm posting here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://doocloud.dev/" rel="noopener noreferrer"&gt;doocloud.dev&lt;/a&gt; - playground works without signup&lt;br&gt;
&lt;a href="https://github.com/nynrathod/doolang" rel="noopener noreferrer"&gt;github.com/nynrathod/doolang&lt;/a&gt; - compiler source&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>api</category>
      <category>devops</category>
      <category>rust</category>
    </item>
  </channel>
</rss>
