Performance Tuning Guide
Integra is a high-performance Go application. This guide covers how to tune it for maximum throughput and low latency.
Go Runtime Tuning
GOMEMLIMIT
Set GOMEMLIMIT to 90% of your container's memory limit to prevent OOM kills while maximizing GC efficiency.
# For a 512MB container
export GOMEMLIMIT=460MiB
GOGC
Default is 100. For high-throughput batch processing where memory is abundant, you can increase this (e.g., 200) to reduce GC frequency.
Horizontal Scaling
Integra is stateless. Scale out by adding more replicas behind a load balancer.
Metric: CPU Utilization
Scale based on CPU. Integra is CPU-bound during parsing. - Target: 70% CPU - Scale Up: > 70% for 2 minutes - Scale Down: < 30% for 5 minutes
Throughput Benchmarks
Single instance (0.5 vCPU, 128MB RAM) - Small Files (10KB): ~500 req/sec - Large Files (1MB): ~50 req/sec
Network Optimization
Keep-Alive
Ensure your clients reuse TCP connections (HTTP Keep-Alive). Establishing a new TLS connection for every AL3 file significantly increases latency.
Compression
- Request: Integra supports gzip-compressed request bodies (
Content-Encoding: gzip). - Response: Integra supports gzip-compressed responses (
Accept-Encoding: gzip). Use this for large JSON outputs.
Batch Size
For batch processing, parallelize at the file level. - Do not concatenate millions of AL3 records into a single file. - Optimal file size: 100KB - 5MB.