v20.57.0
·
116 commits
to master
since this release
Experimental cross-platform uWS::LocalCluster
We've always supported multi-CPU scaling as detailed in the HelloWorldThreaded.cpp example and benchmarking blog posts. However, this example has only been properly supported on Linux systems and contained some really ugly boiler plate code.
This release adds the uWS::LocalCluster helper that works properly on Windows, macOS, Linux and makes it easy to take any single-CPU app and make it scale over all available CPU-cores by default:
uWS::App(options).get(pattern, handler).listen(port, handler).run();
simply becomes
uWS::LocalCluster(options, [](uWS::App &app) {
app.get(pattern, handler).listen(port, handler);
});
This is reflected in the updated HelloWorldThreaded.cpp example and works for both SSL and non-SSL clusters.
v20.56.0 on macOS (capped at 99% CPU-time)
v20.57.0 on macOS (approaches 800% CPU-time)
