by pier25 · 3y ago · 0 comments
A Fastify server app can easily serve thousands of reqs/s.
https://www.fastify.io/benchmarks/
The whole StackExchange network serves on average 50 page views per second.
EDIT: just tested on the eslint codebase:
cold (nothing installed, no cache): bun: 1.53s, pnpm: 8.25s, npm: 25s
hot (already installed, noop): bun: 218ms, pnpm: 1300ms, npm: 1230ms
Webpack 5 is probably the last version. Not my words, but from its main author. Vite is the new de facto bundler which uses EsBuild (written in Go).
I've swapped much of my usage of npm over to bun. I still work on projects where nobody else is using bun, but I can run `bun install` instead of `npm install` and `bun run` instead of `npm run` and these run probably 100x faster.
Except that Bun is not going to be able to do what esbuild is doing because Go and other languages are in another league regarding perf.
Got a reference or specifics on that one?
Basic examples:
- Latency/processing (which suffers as req/s grows or peaks)
- Memory usage (idle, at peak)
- Startup time (one-off jobs, serverless cold boot)
The "thousands of req/s" benchmarks are often unrealistic - either super simple (the benchmark you linked serves a static tiny JSON payload) or hyper optimized and not representing a run-of-the-mill webserver.
A hello world Fastify project can get you into the 20k reqs per second. On the same hardware with a real project you probably will get a couple thousands which is more than enough to satisfy 99% of projects.