Fortran Web Server on a $12 Droplet: How It Beat Python (1.7x, Not 2x)
By Matt Cullerton, founder of Mavric and Apso
A Fortran web API held 38,000 concurrent users on a $12 DigitalOcean droplet in Arjay McCandless's server challenge, 1.7x the best Python entry's 22,000 by his own graphic. His TikTok narration rounds that to "twice as many." The HTTP server underneath is GNU libmicrohttpd, a C library, which the challenge rules allow, and Fortran was not the top entry overall.
What is the $12 server challenge?
The twelve-dollar-server-challenge repository asks developers to build an API that holds as many concurrent users as possible on one box: "a DigitalOcean Basic droplet: 1 vCPU, 2 GB RAM, no swap" running Ubuntu 24.04, with SQLite as the database. DigitalOcean's pricing lists that plan at $12 a month.
To pass, an entry must hold a 5-minute load with p95 latency under 500 ms, p99 under 1 s and errors under 1%. Rule 1 allows "Any language, framework, runtime and SQLite driver/binding."
Did the Fortran entry really hold twice as many users as Python?
No, 1.73x. The narration says "it held twice as many users as our best Python submission," while the on-screen card reads "1.7x users held, same test, same server." The closing leaderboard shows Fortran at 38,000, C# at 32,000, Python at 22,000 and Go at 22,000.
Those per-language figures appear only in the creator's graphics. The repository holds no results file. They come from his YouTube video, I Asked Expert Programmers to Max Out a $12 Server, uploaded 2026-10-13, whose description says "you got it to 64,000 concurrent users. Same 1 vCPU / 2 GB box where my best result last video was 14,050." His earlier video benchmarked eight languages on Postgres.
Was Fortran the fastest language in the challenge?
No. The top result was 64,000 users, so at least one entry held 1.68x what Fortran did. Three rows above Fortran are greyed out in the TikTok's leaderboard, and the YouTube chapters place Fortran sixth of twelve languages. The TikTok's own caption says "Is Fortran faster than Python? Not really, but it did well here!"
A community rerun tells a different story. In issue #7, participant XXMOHAMED012 ran 27 entries under the README's scoring protocol on one Intel i5-13600KF E-core with 2 GiB RAM over loopback. The Fortran entry held 54,500 users at 5,768 requests per second and placed 21st, limited by memory at a 1,987 MiB peak. The two Python FastAPI entries held 57,500 and 62,000, and the two C# entries 65,250 each. The author notes "An E-core over loopback is not the droplet," so the ranking depends on which resource runs out first.
Is the Fortran server really written in Fortran?
Partly. The video says the HTTP server "isn't actually written in Fortran. It's handled by libmicrohttpd, a web server library from GNU written in C, plus a small C bridge." The entry's folder confirms it. The libmicrohttpd README describes it as "a GNU package offering a C library that provides a compact API and implementation of an HTTP 1.1 web server."
The entry pins libmicrohttpd 1.0.2, released 2025-07-14, which the build script downloads from mirrors.kernel.org and checks by SHA-256. The GNU release directory shows newer versions through 1.0.10 on 2026-08-07. The challenge requires pinned dependency versions, so the older pin is deliberate.
The code is exactly 750 lines, as the video says. server.f90 has 311, bindings.f90 146, unicode.f90 118 and bridge.c 175, which is 575 Fortran lines and 175 C lines. The submitter's README says "This is not an implementation written exclusively in Fortran."
The presenter calls the C layer "kind of cheating," but rule 1 allows it, and other top entries did the same. The C++ entry, for example, runs on uWebSockets.
What does the Fortran code handle?
Pull request #16, by GitHub user tbsvttr, says "Fortran owns routing, SQL, JWT claims, Unicode, JSON and transaction policy; a counted C bridge supplies the HTTP/crypto/SQLite ABI adapters." The dispatch subroutine in server.f90 routes /posts and /feed.
The video says "checking a login token is just one SQL query." The claims check is one query using SQLite's json_extract and json_type. The signature check runs in C: bridge.c computes an HMAC-SHA256 with fio-stl, the MIT-licensed facil.io C library. A login check is one SQL query plus HMAC in C.
How does it use SQLite for JSON?
Literally. server.f90 prepares SELECT json_extract(?1,'$.body'),json_type(?1,'$.body') to parse request bodies. SQLite's JSON functions have been built in by default since 3.38.0. The entry pins SQLite 3.53.4, released 2026-07-24 according to the SQLite changelog.
How does the Fortran entry batch database writes?
The video says "every write that came in during a single pass of the event loop shared one database commit." The C bridge runs MHD_run_wait(daemon, 100) and then app_flush(). Requests waiting on an open transaction are suspended, Fortran commits once the event-loop pass ends, and the bridge resumes those connections with their responses.
Rule 6 allows this: "Batching several requests' writes into one transaction (group commit) is allowed if each response waits for its commit." The entry also caps accepted connections at 65,000 and shrinks libmicrohttpd's per-connection memory pool from 32 KiB to 16 KiB.
Is Fortran really from 1957?
Yes. IBM's history page says "In 1957, the IBM Mathematical Formula Translating System, or Fortran, debuted." That is 69 years before 2026.
Pull request #16 shows as "open" in the video, but GitHub records it merged at 21:33 UTC on 2026-10-16, about five minutes before the TikTok posted.
Bottom line
A Fortran entry with a C HTTP layer held 1.7x the best Python entry on the creator's droplet, using SQLite for JSON and one commit per event-loop pass. It finished mid-table, and on different hardware it ranked 21st of 27, behind both Python FastAPI entries.
Sources
- twelve-dollar-server-challenge on GitHub - rules, droplet spec and scoring
- Pull request #16 - the Fortran submission
- Fortran submission folder - source files and README
- Issue #7 - community rerun of 27 entries
- I Asked Expert Programmers to Max Out a $12 Server - the creator's results video
- Which Programming Language Can Handle the Most Users on a $12 Server? - the first challenge video
- GNU libmicrohttpd releases - release dates
- libmicrohttpd 1.0.2 tarball - the pinned version
- SQLite release history - SQLite 3.53.4 date
- SQLite JSON functions - json_extract and json_type
- facil-io/cstl - the C library used for HMAC
- DigitalOcean Droplet pricing - the $12 plan
- IBM: Fortran - 1957 debut
- Dennis Ritchie, The Development of the C Language - C history
- Python General FAQ - Python's 1991 release
- Google Open Source Blog on Go - Go announcement
- Announcing Rust 1.0 - Rust 1.0 release
Published October 16, 2026. Based on a TikTok by @arjay_mccandless. Full video notes (markdown)