This basically makes a rust server to do the routing, then uses the Boa JS engine to evaluate the JS to handle the route
With this approach, you might be able to do some multithreading to improve the throughput
However, each request is almost guaranteed to be slower because V8 will be faster than Boa
You could also achieve this by spinning up multiple NodeJS instances and putting an nginx server in front to do load balancing - which is pretty standard practice
> You could also achieve this by spinning up multiple NodeJS instances and putting an nginx server in front to do load balancing - which is pretty standard practice
I've done this in production plenty of times. Under load, nginx is insanely efficient. Practically all the CPU time ends up spent in your nodejs application server.
The worst part of a setup like this is deployment. There's just a lot of little moving pieces - like nginx needs to keep track of which frontend servers are up and which are down. How are you doing load balancing? You want to have websocket connections? That makes it more complex. How do you deploy code? Etc. Its great, but its not at all simple. Configuring nginx feels like its a little puzzle all of its own.
With this approach, you might be able to do some multithreading to improve the throughput
However, each request is almost guaranteed to be slower because V8 will be faster than Boa
You could also achieve this by spinning up multiple NodeJS instances and putting an nginx server in front to do load balancing - which is pretty standard practice