multiple node.js apps performance in trireme

ccovney
Participant V

Hello Apigee Community,

I wanted to get your thoughts on the performance implications on consolidating ~25 node.js based Apigee Edge API proxies into 1 single node.js API proxy within our On Premise Apigee Edge cluster.

From the perspective of source code management, this would be fantastic; however, I am concerned that there would be degradations in performance because Apigee Edge actually runs Trireme, i.e. node.js on the JVM.

Do you have any recommendations or thoughts on this matter? Thanks a lot!

Best,

Chris

Solved Solved
1 5 504
1 ACCEPTED SOLUTION

Each Node.js application is a complete Node.js runtime within a thread. The fewer Node.js applications you have, the fewer JVM resources you'll use. This should actually improve performance of the MP as a whole.

View solution in original post

5 REPLIES 5

Each Node.js application is a complete Node.js runtime within a thread. The fewer Node.js applications you have, the fewer JVM resources you'll use. This should actually improve performance of the MP as a whole.

Hi @Jeremy Whitlock

Thanks a lot for the quick response. Your explanation makes perfect sense. However, my instincts still seem to tell me that TPS is direction proportional to the number of node.js apps.

Can I bug you to expound a bit on how the number of node.js apps running/serving our API would affect a metric like TPS? Thanks a lot!

Ultimately, the MP running your Node.js application(s) has finite resources and the fewer things consuming those resources, the better. So the more Node.js applications you have running, the more the MP resources are shared across your Node.js applications and the better chance you could have the noisy neighbor problem, where one Node.js application starts starving other Node.js applications...or even the MP as a whole. Thankfully, each Node.js application runs on its own thread but as CPU/RAM/... resources are shared, it is possible for more Node.js applications being deployed to have an adverse impact on your MP's performance, and the Node.js applications running on it.

Hi @Jeremy Whitlock

Thanks a lot for the clarification. Would it be possible for the bottleneck to be not at the CPU/RAM resources level, but rather at the HTTP listener entrypoint, i.e. the node.js application?

In our case, we have ~25 CRUD endpoints, each one having their own api proxy (and associated node.js app). Is there no way that a single Trireme-powered node.js application would reach its concurrent traffic usage limit well before the underlying VM runs out of RAM/CPU etc?

The point I'm trying to get across is that you have one singular JVM per MP and it is the deciding factor on performance. It's performance will be based upon resources available to it, CPU/RAM/... From a resource consumption perspective, 1 Node.js application will consume less resources than the ~25 Node.js applications you're deploying right now. More resources available to the MP should mean better performance, or TPS as you see it. I wish we had more concrete numbers on this but I don't know of any. I'll go looking and if I find something I can share, I'll do so.