Skip to content

uWebsockets.js server much slower if host wasn't passed to listen #1054

Description

@doxlik

Hello dear authors and community. I did some benchmarks last days against uWebsockets server for simple "Hello, World!" example on my MacBook M1 Pro (16GB) using both wrk and bombardier load testing tools. And it may sounds strange, but after dozens of attempts I constantly get much lower throughput when I just use server.lisnen(port, callback) instead of server.listen("0.0.0.0", port, callback). In terms of magnitude that is ~120K/s without passing host and ~180-200K/s for explicit host parameter passing. I also noticed this effect in Bun (built on top of uWebsockets), that passing hostname explicitly make throughput much higher. Is it something related to MacOS or what? I will be grateful for your explanation. P.S the version of uWebsockets is 20.43.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions