Skip to main content

Scaling and High Availability

The agent is designed to horizontally scale to meet the needs of your Superblocks workloads. See instructions below for the relevant scaling and resource allocation settings depending on your deployment method.

info
Recommended minimum resources
  • CPU: 1
  • Memory: 4GiB
  • Replicas: 1 for initial development & staging instances, 3 for production

Kubernetes

See the autoscaling and resources sections of the Helm chart here for the default autoscaling and resource settings. Adjust as needed depending on your workfload.

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 40
targetMemoryUtilizationPercentage: 80
customMetrics: []
# - type: External
# external:
# metricName: nginx.net.request_per_s
# metricSelector:
# matchLabels:
# kube_container_name: nginx
# targetAverageValue: 123

# Please adjust these values as needed depending on your workloads. We recommend allocating
# minimally the following to prevent CPU throttling and Out of Memory errors under load.
resources:
limits:
memory: 4Gi
requests:
cpu: 1
memory: 4Gi

ECS Fargate

Instance Size

To configure the CPU & memory limits allocated to your ECS instances use the following variables in your Terraform file.

container_cpu = 1024
container_memory = 4096

Scaling

AWS will automatically scale your ECS instances based on traffic. To configure the minimum and maximum number of instances the agent can scale to, set the following variables in your Terraform file.

container_min_capacity = 1
container_max_capacity = 10

Google Cloud Run

Instance Size

To configure the CPU & memory limits for your Cloud Run instances, use the following variables in your Terraform file.

container_requests_cpu    = "1"
container_requests_memory = "4Gi"
container_limits_memory = "4Gi"

Scaling

Google will automatically scale your Cloud Run instances based on traffic. To configure the minimum and maximum number of instances the agent can scale to, set the following variables in your Terraform file.

container_min_capacity    = "1"
container_max_capacity = "5"