Skip to content

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Apr 28, 2025

This PR reduces unnecessary .end() call on ServerResponse object, and improves the http server performance of node:http.

  • main: 13.786 kRPS
  • this PR: 50.32 kRPS

related #28601

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit 1df6102 into denoland:main Apr 28, 2025
18 checks passed
@kt3k
Copy link
Member Author

kt3k commented Apr 28, 2025

Sharing the command I used for measuring RPS numbers.

import http from "node:http";

const server = http.createServer((req, res) => {
  res.end("hi");
});

server.listen(3000, () => console.log("listening"));
wrk -t12 -c400 -d10s http://localhost:3000

@kt3k kt3k deleted the perf-node-ext-http-perf branch April 28, 2025 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants