Tip: Optimize Gateway for Large File Uploads
The default configuration settings in the gateway are optimized for handling real-time request-response messages in the range of 1 KB to 50 KB, which are typical in this context. To handle larger message sizes for requests and responses, there are a number of areas to tune in the Gateway and its underlying infrastructure for optimal performance.
gateway90
The default configuration settings in the
CA API Gateway
are optimized for handling real-time request-response messages in the range of 1 KB to 50 KB, which are typical in this context. To handle larger message sizes for requests and responses, there are a number of areas to tune in the Gateway and its underlying infrastructure for optimal performance.The system tweaks described in this topic should be attempted only by the system administrator or advanced users of the
CA API Gateway
. Incorrect adjustments may adversely affect your Gateway or even render it inoperable.Infrastructure
Apply the following infrastructure modifications to handle large files more efficiently:
Allocated Memory (Appliance Gateway only)
Configure the
CA API Gateway
to use more RAM. By default, the Gateway use half the physical memory. To use a larger amount, edit this file:/opt/SecureSpan/Gateway/runtime/etc/profile.d/appliancedefs.sh
Locate the following section and comment out the "let java_ram" line. Create a new version of this line, replacing ""$system_ram*$multiplier" with the actual memory amount to use (in kilobytes).
Tip:
Commenting out the original line rather than changing it allows you to revert to the original settings more easily.system_ram=`grep MemTotal /proc/meminfo | awk '{print $2}'` # Maximum amount of RAM to use multiplier="1/2" let java_ram="$system_ram*$multiplier"
Restart the
CA API Gateway
for the changes to take effect.JVM Heap Size
Increase the Java Virtual Machine (JVM) heap size in order to increase the amount of memory available for storing messages in memory.
To set the heap size on Software Gateways, edit the file node.properties and change the following setting:
node.java.heap=
<value>
where "<value>" is the memory, in megabytes. For example, “node.java.heap=4096” sets the heap size to 4GB.
Note:
Keep the JVM heap size to less than half of your computer's RAM, unless you have very specific reasons to do otherwise.Cluster Properties
Update the following cluster properties:
- attachment.diskThresholdIf your machine has a large amount of RAM, set this property to a higher value to keep more messages in memory rather than have them streamed to disk. The maximum possible value is 2000000000.
- io.signedPartMaxBytes,io.xmlPartMaxBytesSet these properties to zero to disable size restrictions.
- request.compress.gzip.allowSet this to allow compressed requests.
- template.partBodyMaxSizeSet this cluster property to 1100000000 (bytes).
Policy
Observe the following in your policies:
- Streaming is possible on response messages (i.e., downloads), provided that there are no assertions that interrogate the message payload between the back end routing assertion and the conclusion of the policy. Examples of interrogating assertions include: threat scanning, schema validation, or transformation.
- Ensure that size limits are removed or set to very high values in all listen port and routing assertions.