Add section about Bun support to SVR.JS documentation

This commit is contained in:
Dorian Niemiec 2024-04-03 09:05:39 +02:00
parent ed443841e2
commit 89ad4682ce
2 changed files with 12 additions and 0 deletions

View file

@ -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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB