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
<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
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
- 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.
Is there a limit on request header size?
For the most recent versions of Node.js (11.3.0+) as well as
LTS versions including 6.14.0+, 8.14.0+, and 11.3.0+,
the maximum request header size that you can use in a Node.js
application is 8 KB. If you want to pass headers that are bigger that 8 KB, specify another version of
Node.js that is not on the above list. You can do this in the application's
package.json file. For example:
runtime: node runtimeVersion:6.4.1 application:my-express-app env: - name: NODE_ENV value: production - name: LOG_LEVEL value: 3