Bassically · Tech Reviews, part 1. I measured this on my own machine. The code is in the repo.
Short answer: route.go wins on speed, route.ts wins on everything else. For now, stay on route.ts.
What I tried
Next.js canary has a new feature: an API route can be written as route.go (Next.js docs). It was merged on 3 November 2026 and is still experimental.
I wrote three routes, each one twice: once as route.ts, once as route.go. Then I compared four things.
Difference 1: who runs your code
Take one request, GET /api/hello. It goes through four steps:
- Take the request from the browser.
- Find the route that matches
/api/hello. - Run the
GETfunction you wrote. - Send the answer back.
With route.ts, Node does all four.
With route.go, Node still does steps 1, 2 and 4. It hands step 3 to a Go program, because Node cannot read Go code.
So each Go route is one more program running next to Node. After I called three Go routes, the machine was running four processes: Node, plus one per Go route (9, 12 and 19 MB).
Difference 2: speed
route.go answered about 3 times more requests for a small JSON: 9,927 per second against 3,034.
For heavy math the gap is at least 7 times (7 to 13 across five runs). Part of that is Go using every core while Node runs on one thread. Even on one core, Go is still 2 times faster.
Difference 3: deploy
route.ts runs every way Next.js can be deployed.
route.go today only runs with next start, on a machine with the same operating system as the build machine. standalone output, the one usually used for Docker, is not supported.
Check it yourself: Deployment and Build and Runtime Limitations in the docs.
Difference 4: features
- Caching.
route.tscan be cached.route.goalways runs again (Segment Config Options). - First request.
route.tstakes about 12 ms.route.gotook 0.3 to 0.9 seconds on the first start after a build, because its program only starts when the first request arrives. On later restarts it took 13 to 35 ms. - Status.
route.tsis stable.route.gois experimental and can still change, and its page is only in the preview docs so far.
Conclusion
route.ts | route.go | |
|---|---|---|
| Small JSON | 3,034 requests/s | 9,927 requests/s |
| Heavy math | 178 requests/s | 1,332 requests/s |
| First request after a build | 12 ms | 0.3–0.9 s |
| Your code runs in | Node | a Go program, one per route |
| Deploy | every way | next start only |
| Can be cached | yes | no |
| Status | stable | experimental |
Which one to use?
- Almost every route:
route.ts. - One heavy route:
route.go, but later, once the feature is stable.
How it was measured
50 connections for 15 seconds per route, next start, one laptop (Apple silicon, 10 cores), one run. So read the gaps, not the last digit. The deploy and caching limits come from the documentation; I did not test them myself.
Code
Every route, the scripts and the raw results: github.com/haryarrahman14/tech-reviews, folder 01-nextjs-go-routes.
Sources
route.goreference, Next.js preview documentation. The limits quoted here are in its Deployment, Build and Runtime Limitations and Segment Config Options sections.route.jsreference, Next.js documentation, for how a TypeScript route is cached.outputoption, Next.js documentation, forstandalone.- vercel/next.js#100130, the pull request that added the feature.
Follow
- Instagram (Bahasa Indonesia): @dasarnya.id
- Instagram (English): @bassically.en
- Threads (Bahasa Indonesia): @dasarnya.id
- Threads (English): @bassically.en
- Medium: @haryarrahman14