Guidelines for Configuring Resources for the Container Gateway
It is important to set appropriate resource limits for your containers to avoid over-committing your container infrastructure and to ensure consistent performance of the gateway. Since container resource limits are not visible to the Container Gateway, you need startup arguments to reduce the amount of resources the Container Gateway uses.
gateway93
It is important to set appropriate resource limits for your containers to avoid over-committing your container infrastructure and to ensure consistent performance of the
CA API Gateway
. Since container resource limits are not visible to the Container Gateway, you need startup arguments to reduce the amount of resources the Container Gateway uses.Contents:
Best Practice Recommendations
CA Technologies recommends the following guidelines for configuring the Container Gateway and container resources:
CPU
- Allocate a specific number of CPUs to the container. Do not leave the CPU allocation settings unset.
- For consistent performance, consider assigning the container’s CPUs to specific physical cores.
Memory
- The memory allocated to the container should be 50% greater than the Gateway heap size, or 1GB greater than the heap size, whichever is larger.
- Increasing message processing thread pool and connection pool sizes may require allocation of additional memory.
- Carefully validate container memory allocation in pre-production environments.
- Disable memory swapping.
IOPS
- Ensure containers are provisioned with sufficient IOPS (Input/Output Operations per Second).
- Carefully validate container IOPS allocation in pre-production environments.
JVM Configuration
- TheXX:ParallelGCThreadsflag should be set to a value no greater than the number of CPUs allocated to the container.
Example of Resources and JVM Environment Variables Configuration: Docker Compose v2.2
The following Docker Compose file example includes settings that implement the CPU, memory, and JVM configuration guidelines for a Container Gateway with a 4GB heap and 4 CPUs.
version: '2' services: api-gateway: image: mydocker.registry.com/gateway-image:latest cpus: 4 cpuset: 0-3 mem_limit: 6g memswap_limit: 6g mem_swappiness: 0 environment: SSG_JVM_HEAP: "4g" EXTRA_JAVA_ARGS: "-XX:ParallelGCThreads=4"
Docker Deployment
To apply these resourcing guidelines to deployment with Docker, see the following external Docker documentation:
OpenShift Deployment
To apply these resourcing guidelines to deployment in OpenShift, see the following external OpenShift Origin documentation: