
Deploying a Hono App to Vercel: Comparing Behavior with Different Function Region and Runtime Settings
This page has been translated by machine translation. View original
Introduction
I deployed a Hono app targeting users in Japan to Vercel, changed the function region and runtime, and measured the response time. The function region is the region where the function runs, and the runtime can be chosen from Node.js and Bun. I compared the response times across the four combinations of these two settings.
Both the function region and the runtime could be configured in vercel.json without changing the Hono app's code. Setting the function region to Tokyo reduced the response time from Japan to about 40% of that of the default US East function region. Even when the runtime was changed, Hono's processing time was under 1 ms for both.
What is Hono
Hono is a lightweight web framework built on top of Web standard APIs. A Hono app runs with the same code on multiple runtimes such as Cloudflare Workers, Deno, Bun, and Node.js.
Test Environment
| Item | Value |
|---|---|
| Hono | 4.13.19 |
| create-hono | 0.19.5 |
| TypeScript | 7.0.2 |
| Node.js on Vercel | v26.13.1 |
| Bun on Vercel | 1.4.4 |
| Vercel CLI | 66.2.0 |
| Measurement client | macOS in Japan, Wi-Fi connection |
| Measurement date | 2026-11-19 |
References
- Hono on Vercel
- Configuring regions for Vercel Functions
- Using the Bun Runtime with Vercel Functions
- Timing Middleware
Background
Since August 2025, Vercel has allowed you to deploy Hono apps with zero configuration. When you export default a Hono app from the entry point, Vercel runs the Hono app as Vercel Functions.
The default function region is iad1 in US East. Vercel gives as the reason that many external data sources are located in US East. The default runtime is Node.js, and Bun can also be selected as a Beta.
The Hono official site publishes benchmarks. What these benchmarks measure is the speed of the router alone and the processing performance on Cloudflare Workers and Deno in a local environment.
DevelopersIO has introduced a case where, in a setup that calls an API in Tokyo from a Next.js page, changing the function region to Tokyo shortened the response time.
In this article, for a Hono app that does not connect to any data source, I change the function region and runtime and check the response time and Hono's processing time for each combination.
Test Method
Creating the Hono App
I created a Hono app with the vercel template of create-hono, and added the timing middleware and the /api/hello route to src/index.ts. The timing middleware records the processing time in the Server-Timing header of the response.
npx create-hono@0.19.5 app --template vercel --pm npm --install
import { Hono } from 'hono'
import { timing } from 'hono/timing'
const app = new Hono()
app.use(timing())
app.get('/api/hello', (c) => {
const bun = (globalThis as { Bun?: { version: string } }).Bun
return c.json({
message: 'Hello Hono!',
runtime: bun ? `bun ${bun.version}` : `node ${process.version}`,
region: process.env.VERCEL_REGION ?? 'unknown',
})
})
export default app
/api/hello returns the currently running runtime and function region as JSON. The total in Server-Timing is the time from when the timing middleware calls the subsequent processing until control returns. Hereafter, I refer to this value as Hono's processing time.
Fixing the Template's Build Error
When I deployed the Hono app from the vercel template to Vercel, the build failed with the following error. Even with the template before changing src/index.ts, the same error occurred with vercel build locally.
2026-11-19T01:17:06.954Z Using TypeScript 7.0.2 (local user-provided)
2026-11-19T01:17:06.954Z Using the TypeScript 7.0.2 compiler executable for transpilation.
2026-11-19T01:17:07.084Z Error: [NODE_TYPESCRIPT_ERROR] error TS2688: Cannot find type definition file for 'node'.
2026-11-19T01:17:07.084Z The file is in the program because:
2026-11-19T01:17:07.085Z Entry point of type library 'node' specified in compilerOptions
2026-11-19T01:17:07.085Z Fix: Fix the TypeScript errors logged above, then rebuild.
When using TypeScript 7, Vercel's builder type-checks by inheriting the project's tsconfig.json from a configuration file created in a temporary directory. Because the default search location for type definitions is determined relative to the temporary directory at this point, I believe TypeScript can no longer find @types/node. Explicitly specifying the search location in tsconfig.json made the build succeed.
"rootDir": "./src",
- "outDir": "./dist"
+ "outDir": "./dist",
+ "typeRoots": ["./node_modules/@types"]
},
Deployment and Configuration
I deployed the same code to production on four Vercel projects, changing only the contents of vercel.json for each project. The combination of iad1 and Node.js uses the default values, so I did not place a vercel.json. For the remaining three projects, I wrote only the settings to be changed. The vercel.json for the combination of hnd1 and Bun is as follows.
{
"regions": ["hnd1"],
"bunVersion": "1.4.x"
}
npx vercel@66.2.0 deploy --prod
Measurement Procedure
I sent requests to the four production URLs with curl. After sending 5 warm-up requests to each combination, I repeated 50 times the process of sending one request to each of the four combinations. To avoid bias from ordering, I randomly changed the sending order for each iteration. From curl's time_appconnect I obtained the time until the TLS connection was established, and from time_starttransfer the time until the first byte was received, and aggregated the median for each combination. Hereafter, the time until the first byte is received is referred to as the response time.
Measurement script
#!/usr/bin/env bash
# Usage: ./measure.sh <output JSONL> <label>=<URL> [<label>=<URL> ...]
# After sending warm-up requests to each URL, send one request to each per round, changing the order every round.
set -euo pipefail
out="$1"
shift
WARMUP="${WARMUP:-5}"
ROUNDS="${ROUNDS:-50}"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
request() {
local phase="$1" round="$2" label="$3" url="$4"
curl -sS -o "$tmp/body" -D "$tmp/headers" -w '%{json}' "$url" > "$tmp/writeout"
jq -nc \
--arg phase "$phase" --argjson round "$round" --arg label "$label" \
--arg at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--rawfile headers "$tmp/headers" --rawfile body "$tmp/body" \
--slurpfile w "$tmp/writeout" \
'{phase: $phase, round: $round, label: $label, at: $at, headers: $headers, body: $body, curl: $w[0]}' \
>> "$out"
}
for target in "$@"; do
for i in $(seq 1 "$WARMUP"); do
request warmup "$i" "${target%%=*}" "${target#*=}"
done
done
for round in $(seq 1 "$ROUNDS"); do
for target in $(printf '%s\n' "$@" | sort -R); do
request measure "$round" "${target%%=*}" "${target#*=}"
done
done
Results
Confirming the Function Region and Runtime
The response for the combination of hnd1 and Bun is as follows.
HTTP/2 200
age: 0
cache-control: public, max-age=0, must-revalidate
content-type: application/json
date: Thu, 19 Nov 2026 01:27:40 GMT
server: Vercel
server-timing: total;dur=0.0;desc="Total Response Time"
strict-transport-security: max-age=63072000; includeSubDomains; preload
x-vercel-cache: MISS
x-vercel-id: kix1::hnd1::rw78h-1795051660110-2364087e2473
{"message":"Hello Hono!","runtime":"bun 1.4.4","region":"hnd1"}
The first value of x-vercel-id indicates the edge that received the request, and the second value indicates the function region. In all 200 measurements, the function region and runtime were as configured. Also, in all 200 measurements, the kix1 edge in Osaka received the request.
Breakdown of Response Time
The value in each column is the median of 50 measurements.
| Combination | Response time (ms) | Response time after TLS connection established (ms) | Hono processing time (ms) |
|---|---|---|---|
iad1 + Node.js |
245.8 | 203.4 | 0.2 |
iad1 + Bun |
245.2 | 202.1 | 0.0 |
hnd1 + Node.js |
98.5 | 55.4 | 0.1 |
hnd1 + Bun |
96.9 | 54.4 | 0.0 |
Hono's processing time is a value that the timing middleware records in units of 0.1 ms. 0.0 indicates less than 0.05 ms.
The time until the TLS connection was established was around 42 ms for all four combinations. The response time of hnd1 was about 40% of that of iad1 with both Node.js and Bun, and about 27% when limited to the time after the TLS connection was established. The median of Hono's processing time stayed at 0.2% or less of the time after the TLS connection was established in every combination.
Discussion
With Vercel, you can easily publish a Hono app to the internet without preparing servers or a CDN yourself. On the other hand, a Hono app deployed with the default settings runs in iad1 in US East, and in this measurement the response time from Japan was about 2.5 times that when the function region was set to Tokyo. I think that being easy also means it is easy to start operating without reviewing the default settings. Before deploying, it is a good idea to confirm that the default settings match where your users are located.
Summary
Setting the function region to hnd1 shortened the response time from Japan to about 40% of that of iad1, whereas changing the runtime kept Hono's processing time under 1 ms for both and had almost no effect on the response time.
This article introduced that the function region and runtime can be configured for a Hono app running on Vercel, but of the two settings, the function region setting in particular seems likely to have a large effect on response time. For a Hono app targeting users in Japan, I recommend setting the function region to Tokyo.