Scaling ASP.NET Core Minimal API Responses
09/07/2025
I have been running an ASP.NET Core application on Raspberry Pi Zero 2W. In an early performance test, I have deployed an application with two endpoints: /
and /data
. These endpoints return a simple string
response as shown below.
app.MapGet("/", () => { return "Hello World"; }); app.MapGet("/data", (HttpContext ctx) => { ctx.Response.StatusCode = 200; var buffer = ctx.Response.BodyWriter.GetSpan(11); "Hello World"u8.CopyTo(buffer); ctx.Response.BodyWriter.Advance(11); });
The application is compiled for .NET 9, without enabling native AOT. I have measured the performance of these APIs using CHttp tool.
CHttp is a simple tool to test performance of HTTP endpoints.