Documentation

Customize your cluster scale

InfluxDB Clustered lets you scale each component in your cluster individually, so you can customize your cluster’s scale to address the specific the specific needs of your workload. For example, if you have a heavy write workload, but not a heavy query workload, you can scale your Router and Ingester both vertically and horizontally to increase your write throughput and latency.

Default scale settings

  • 1 router: Additional routers increase your cluster’s ability to handle concurrent write requests.
  • 3 ingesters: Ensures redundancy on the write path.
  • 1 querier: The optimal number of queriers depends on the number of concurrent queries you are likely to have and how long they take to execute.
  • 1 compactor: While you can have multiple compactors, it is more efficient to scale the compactor vertically (assign more CPU and memory) rather than horizontally (increase the number of compactors).
  • 1 garbage collector: The garbage collector is a light-weight process that only needs to be scaled vertically when you observe high resource usage by the garbage collector. The garbage collector cannot be scaled horizontally.

The default values provide a good starting point for testing. Once you have your cluster up and running and are looking for scaling recommendations for your anticipated workload, please contact the InfluxData Support team to help you identify appropriate scale settings based on your anticipated workload.

Customize scale settings

Your AppInstance resource controls the scale of components in your InfluxDB cluster. You can edit the AppInstance resource directly or, if using the InfluxDB Clustered Helm chart to manage your deployment, you can edit resource settings in your values.yaml.

For specific scaling recommendations and guidelines, see Scale your cluster.

With Kubernetes, you can define the minimum resources and the resource limits for each component.

To use custom scale settings for your InfluxDB cluster, edit values for the following fields in your myinfluxdb.yml. If omitted, your cluster uses the default scale settings.

  • spec.package.spec.resources
    • ingester
      • requests
        • cpu: Minimum CPU resource units to assign to ingesters
        • memory: Minimum memory resource units to assign to ingesters
        • replicas: Number of ingester replicas to provision
      • limits
        • cpu: Maximum CPU resource units to assign to ingesters
        • memory: Maximum memory resource units to assign to ingesters
    • compactor
      • requests
        • cpu: Minimum CPU resource units to assign to compactors
        • memory: Minimum memory resource units to assign to compactors
        • replicas: Number of compactor replicas to provision
      • limits
        • cpu: Maximum CPU resource units to assign to compactors
        • memory: Maximum memory resource units to assign to compactors
    • querier
      • requests
        • cpu: Minimum CPU resource units to assign to queriers
        • memory: Minimum memory resource units to assign to queriers
        • replicas: Number of querier replicas to provision
      • limits
        • cpu: Maximum CPU resource units to assign to queriers
        • memory: Maximum memory resource units to assign to queriers
    • router
      • requests
        • cpu: Minimum CPU resource units to assign to routers
        • memory: Minimum memory resource units to assign to routers
        • replicas: Number of router replicas to provision
      • limits
        • cpu: Maximum CPU Resource units to assign to routers
        • memory: Maximum memory resource units to assign to routers
    • garbage-collector
      • requests
        • cpu: Minimum CPU resource units to assign to the garbage collector
        • memory: Minimum memory resource units to assign to the garbage collector
      • limits
        • cpu: Maximum CPU Resource units to assign to the garbage collector
        • memory: Maximum memory resource units to assign to the garbage collector
    • prometheus
      • requests
        • cpu: Minimum CPU resource units to assign to prometheus
        • memory: Minimum memory resource units to assign to prometheus
      • limits
        • cpu: Maximum CPU Resource units to assign to prometheus
        • memory: Maximum memory resource units to assign to prometheus

View example AppInstance with resource requests and limits

To use custom scale settings for your InfluxDB cluster, modify the following fields in your values.yaml. If omitted, your cluster will use the default scale settings.

  • resources
    • ingester
      • requests
        • cpu: Minimum CPU resource units to assign to ingesters
        • memory: Minimum memory resource units to assign to ingesters
        • replicas: Number of ingester replicas to provision
      • limits
        • cpu: Maximum CPU resource units to assign to ingesters
        • memory: Maximum memory resource units to assign to ingesters
    • compactor
      • requests
        • cpu: Minimum CPU resource units to assign to compactors
        • memory: Minimum memory resource units to assign to compactors
        • replicas: Number of compactor replicas to provision
      • limits
        • cpu: Maximum CPU resource units to assign to compactors
        • memory: Maximum memory resource units to assign to compactors
    • querier
      • requests
        • cpu: Minimum CPU resource units to assign to queriers
        • memory: Minimum memory resource units to assign to queriers
        • replicas: Number of querier replicas to provision
      • limits
        • cpu: Maximum CPU resource units to assign to queriers
        • memory: Maximum memory resource units to assign to queriers
    • router
      • requests
        • cpu: Minimum CPU resource units to assign to routers
        • memory: Minimum memory resource units to assign to routers
        • replicas: Number of router replicas to provision
      • limits
        • cpu: Maximum CPU Resource units to assign to routers
        • memory: Maximum memory resource units to assign to routers
    • garbage-collector
      • requests
        • cpu: Minimum CPU resource units to assign to the garbage collector
        • memory: Minimum memory resource units to assign to the garbage collector
      • limits
        • cpu: Maximum CPU Resource units to assign to the garbage collector
        • memory: Maximum memory resource units to assign to the garbage collector

View example values.yaml with resource requests and limits

Apply the changes to your cluster

Use kubectl or helm (if using the InfluxDB Clustered Helm chart), to apply the changes to your cluster:

kubectl apply \
  --filename myinfluxdb.yml \
  --namespace influxdb
  • Copy
  • Fill window
helm upgrade \
  influxdata/influxdb3-clustered \
  -f ./values.yml \
  --namespace influxdb
  • Copy
  • Fill window

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB 3 Core and Enterprise are now in Beta

InfluxDB 3 Core and Enterprise are now available for beta testing, available under MIT or Apache 2 license.

InfluxDB 3 Core is a high-speed, recent-data engine that collects and processes data in real-time, while persisting it to local disk or object storage. InfluxDB 3 Enterprise is a commercial product that builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries. A free tier of InfluxDB 3 Enterprise will also be available for at-home, non-commercial use for hobbyists to get the full historical time series database set of capabilities.

For more information, check out: