Here’s a gif I made of the awesome R API framework, Plumber, in action via pm2.
On the left, are the individual endpoints showing CPU and memory usage. In this example we have 5 replica endpoints and a load balancer, the last of the items on the left, round-robining between them. The load balanacer in this case is also under the control of pm2.
On the right we have the results coming back from the API. It’s just a really simple currency conversion API, with support for multiple currencies, so what you’re seeing there is every currency being converted to every other currency.
This is obviously all pretty simple stuff, but using these tools together enables us to process somewhere in the region of 200 requests a second, which is not too shabby at all.