Back to articles
I Benchmarked NestJS GraphQL: Express vs Fastify vs Mercurius — Here's What Actually Won

I Benchmarked NestJS GraphQL: Express vs Fastify vs Mercurius — Here's What Actually Won

via Dev.to WebdevVolodymyr Diachenko

TL;DR : Under sustained load, Mercurius is the clear winner, outperforming the other setups by 60–89% across all tested scenarios. But low-concurrency benchmarks tell a different story. The “best” choice depends heavily on how you test. Live Dashboard | GitHub The Setup I benchmarked three NestJS GraphQL server configurations using the same schema, resolvers, and in-memory data generators. The only differences were the HTTP transport and GraphQL engine. Server HTTP Transport GraphQL Engine Express + Apollo @nestjs/platform-express Apollo Server 4 Fastify + Apollo @nestjs/platform-fastify Apollo Server 4 Fastify + Mercurius @nestjs/platform-fastify Mercurius 14 All tests were run with k6 in sequential mode — one server at a time, using the full machine. Each run included 500 warmup requests, and every GraphQL response was validated. I used two benchmark profiles: Quick: 10 VUs, ~3 minutes Standard: 50 VUs, ~20 minutes Standard Results (50 VUs) Express Fastify Mercurius Health (light): 6

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
3 views

Related Articles