Traditional Node.js deployment on Edge

The traditional Node.js support on Apigee Edge provides an embedded Node.js runtime environment that is scoped to an Apigee organization and environment. Node.js applications deployed to this environment can serve as the target for any API proxies that are deployed to that same organization/environment.

The traditional Edge Node.js support relies internally on an open-source bridge application called (Trireme) and a JavaScript interpreter called (Rhino) that allow Node.js code to execute in the Edge Java runtime environment.

There are several limitations associated with this approach. For example:

  • Only an older version of Node.js (0.10.32) is supported.
  • There are subtle differences in behavior between the standard Node.js environment and the Trireme/Rhino environment.
  • Debugging Node.js apps after they are deployed to Edge is difficult.

Node.js apps deployed to Hosted Targets do not depend on any Apigee-specific Node.js run-time technology. Your Node.js app will run in Hosted Targets exactly as it runs in your local development environment.

Samples

The Node.js repository contains a number of basic examples from deploying a simple Hello World! server to an employee database API that leverages a cloud-based datastore.

We also recommend that you explore the Node.js samples in the API proxy cookbook. The cookbook samples focus on common problem-solving patterns related to API development, like writing backend Node.js logic to interact with API BaaS. See, for example, Using Node.js to communicate with a backend data store.

Performance tips

See Node.js Performance Tips: Socket Pooling in the Apigee Community.

Next Steps

Now that you know a little about Node.js support in Apigee Edge, it's time to see Node.js on Edge in action. In the next topic, Getting started with Node.js on Apigee Edge, we'll show you how to proxy a very simple "Hello World" Node.js app on Apigee Edge using the management UI. Later, we'll show you how to deploy Node.js apps directly from your development machine to Edge using the command-line interface.

Limitations

Traditional Edge Node.js support relies internally on an open-source bridge application (Trireme) and a JavaScript interpreter (Rhino) that allow Node.js code to execute in the Edge Java runtime environment.

There are several limitations associated with this approach. For example:

  • Only an older version of Node.js (0.10.32) is supported.
  • There are subtle differences in behavior between the standard Node.js environment and the Trireme/Rhino environment.
  • Debugging Node.js apps after they are deployed to Edge is difficult.