-
I just tried to run the hello world sample (untouched), it seems to be running fine when I try it in my browser but when I try with ab (apache bench) I get this strange output (and 12 sec time per request) Server Port: 80 Document Path: / Concurrency Level: 128 Connection Times (ms) Percentage of the requests served within a certain time (ms) Any idea why and how to fix this? :) |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
Will switching to https://github.com/loadimpact/k6 fix this? |
Beta Was this translation helpful? Give feedback.
-
Sadly projects like AB still see usage today even though it runs the now 25 year old http 1.0 protocol, which no modern web browser or client talks. We only support / acknowledge protocols that see actual real world usage today. By refusing to fix this thing, it's easy to spot when you do user http 1.0, such as is the case with nginx proxying by default. Fix by swapping to 1.1 |
Beta Was this translation helpful? Give feedback.
-
Wrk is probably the most well known alternative to ab |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot Alex, I was not aware of Wrk & the situation with ab I've just tested with Wrk on my test VM (Hetzner CX21 - 2 Skylake vcores - 4gb ram) for a simple hello world with Fastify VS uWebSocket.js Fastify running in cluster mode with 2 instances uWebSocket.js running with just node (is crashing in cluster mode because the port is already in use) 3 times better than Fastify, Wow! |
Beta Was this translation helpful? Give feedback.
-
While I'm testing with Wrk, I have tested a small real world use case: an auth api calling a local redis server to store/fetch the data Fastify (mono process with node): 30 625 Requests/sec I've re-runned the test several time because it was contradictory with the hello world test, and I always get the same results. Not sure why. |
Beta Was this translation helpful? Give feedback.
-
I can't help you with that here, you can always send me a mail for professional help |
Beta Was this translation helpful? Give feedback.
-
@jbenguira Could you show the code you have for uWS? |
Beta Was this translation helpful? Give feedback.
-
I've just rerunned now with the latest version, unfortunately I don't have access to the same hardware than 1 month ago. Also now both version produce similar results: ~12K RPS /////////////////// uWebSockets.js //////////////////// var redis = require("redis"); /////////////////// Fastify //////////////////// fastify.get('/', (request, reply) => { |
Beta Was this translation helpful? Give feedback.
Wrk is probably the most well known alternative to ab