According to https://github.com/uWebSockets/uWebSockets/issues/397#issuecomment-277237968, uws.http is considerably faster than http.
uWebSockets/blob/master/nodejs/http_sillybenchmark.js
uWebSockets/blob/master/nodejs/http.jsPerformance is still very good as long as writeHead is not called in a hot path (this function is very slow). If you only res.end('some data here'); you get 230k requests per second.
from https://github.com/uWebSockets/uWebSockets/issues/397#issuecomment-275276648
Currently and only in v.0.13.0a6 (since a1). Near drop-in replacement for Next's use case? May need to be tested and benchmarked in a production environment.
Could you tell me where exactly you suggest to use this?
Anyway, since do support custom servers I hope this is doable in the userspace.
from
import http, { STATUS_CODES } from 'http'
to
import http, { STATUS_CODES } from 'uws.http'
It could indeed be a user choice, but if the benchmarks get confirmed, the transition is as seamless as it might appear (e.g.? https://github.com/uWebSockets/uWebSockets/issues/397#issuecomment-275332402), and it doesn't cause significant maintenance overhead, why not?
v0.13.0 was released the other day. @arunoda Could you reopen the issue to allow for a thorough evaluation?
Most helpful comment
master/server/index.js#L4
from
to
It could indeed be a user choice, but if the benchmarks get confirmed, the transition is as seamless as it might appear (e.g.? https://github.com/uWebSockets/uWebSockets/issues/397#issuecomment-275332402), and it doesn't cause significant maintenance overhead, why not?