benchmarks icon indicating copy to clipboard operation
benchmarks copied to clipboard

Adds uWebSockets server

Open streamich opened this issue 2 years ago • 3 comments

This PR adds uWebSockets server.

image

Checklist

streamich avatar Apr 04 '22 14:04 streamich

Why is it fair to compare an HTTP framework with a Web Sockets framework?

jsumners avatar Apr 04 '22 14:04 jsumners

@jsumners I guess you imply that uWebSockets library is a "Web Sockets framework". uWebSockets is a library which provides an HTTP server as well as a WebSocket server. The benchmark in this PR only tests the HTTP server part; I assume the WebSocket implementation of uWebSocket would be even faster. But that indeed would not be fair.

streamich avatar May 13 '22 11:05 streamich

It is a C++ server if I'm not wrong, so the comparison is tricky for the reader

Eomm avatar May 31 '22 14:05 Eomm

@Eomm nope, it is JavaScript, you can see the route handler in this PR: https://github.com/fastify/benchmarks/blob/162467d8c8b8d28d22d97d6113bf23f672f8910f/benchmarks/uWebSockets.js

streamich avatar Apr 06 '23 16:04 streamich

The app var is not 😅

Eomm avatar Apr 06 '23 16:04 Eomm

Essentially these benchmarks now are deceiving the reader, uws is about 2x faster than fastify, but the whole purpose of this repo is to promote fastify.

streamich avatar Apr 06 '23 17:04 streamich