Hosted Targets FAQ

Is there management API support for Hosted Target proxies?

No new management APIs were created or existing APIs changed to support Hosted Targets; however, you can use existing management APIs to deploy and manage proxies that use Hosted Targets, as long as the Hosted Target proxies are properly constructed. See also Required directory struture for your Node.js app.

Can I use IP whitelisting to secure my target backend?

The technology upon which Hosted Targets is built, Google App Engine (GAE), does not provide a way to give a static IP address to an app. GAE uses an IP pool range; therefore, it may be possible to whitelist a range of IP addresses. For more information, refer to this GAE FAQ entry, Static IP Addresses and App Engine apps.

Can I put multiple <HostedTarget> target endpoints in one proxy?

You can specify multiple <HostedTarget> elements in the target endpoint of a proxy; however, only one Hosted Target is deployed per proxy. This is the application in the proxy's resources/hosted directory. Any route rules to different instances of <HostedTarget> will route them to the same deployed Hosted Target application.

Is it possible to work around the lack of apigee-access?

You cannot use the apigee-access module in Hosted Targets apps. If you use traditional, embedded Node.js with apigee-access and want to migrate to Hosted Targets, consider the following possibilities:

  • Use Edge policies - Where possible, use standard Edge policies to replace what your existing apigee-access code does.
  • Use headers - You can put KVM values and flow variables to your Node.js application in HTTP request headers. This strategy works for KVM values or flow variables that are available in the request flow of the API proxy.
  • Use environment variables - You can set environment variables whose values are provided by the KVM. This is documented in the manifest file portion of the user guide.

Can I use Java Keystores (JKS) Files for TLS?

Hosted Targets does not support JKS for TLS as a replacement for PEM files, see previous documentation here. Hosted Targets uses native Node.js and thus uses OpenSSL natively. Please refer to the TLS (SSL) documentation provided by Node.js docs when setting up TLS/SSL connections.

What's the best way to manage temporary files?

Always delete temporary files. Local disk storage in the temporary directory is an in-memory filesystem. All files that you write consume memory available to your function. Files that you write are usually available at consecutive invocations, therefore failing to delete these files may eventually lead to an out-of-memory error and a subsequent cold start.

Do not attempt to write outside of the temporary directory. Also, use platform-independent methods such as os.tmpdir() and path.join() to construct the temporary file path, so that your functions also work on the emulator on any platform.

For more information, see this Google Cloud document.

Can I deploy multiple proxy revisions?

Apigee Edge allows you to deploy multiple revisions of a proxy to an environment with different basepaths; however, this behavior is not supported for Hosted Targets.