diff --git a/source/docs.md b/source/docs.md index 207ff7b..46d37b2 100644 --- a/source/docs.md +++ b/source/docs.md @@ -213,6 +213,18 @@ SVR.JS can be updated manually by extracting _svr.js_, _modules.compressed_ and * **Problem: _There was a problem while saving logs! Logs will not be kept in log file._** Solution: Check your _log_ directory. +### Bun support + +SVR.JS is currently partially compatible with Bun JavaScript runtime. In the benchmark shown below, SVR.JS on Bun 1.1 has around 2.8 times more requests per second and over 5 times lower maximum latency than SVR.JS on Node.JS 18.19.1 LTS. + +![SVR.JS on Bun is faster than SVR.JS on Node.JS](/img/nodejs-vs-bun.png) + +However, SVR.JS on Bun currently has these limitations: +* Proxy requests with _CONNECT_ method are not supported. +* WebSocket requests are not supported (via _req.socket_ API). +* There is just one worker process (Bun 1.0 and later; due to _cluster_ module not being implemented in Bun; SVR.JS shims the cluster module, but ports aren't shared in Bun 1.0 and later). +* PBKDF2 function blocks the event loop, which may cause denial of service. + ## Configuration SVR.JS can be configured by modifying _config.json_ file. diff --git a/source/img/nodejs-vs-bun.png b/source/img/nodejs-vs-bun.png new file mode 100644 index 0000000..10301dc Binary files /dev/null and b/source/img/nodejs-vs-bun.png differ