diff --git a/modules/jaeger-config-collector.adoc b/modules/jaeger-config-collector.adoc index c1738c2578..94ffdad042 100644 --- a/modules/jaeger-config-collector.adoc +++ b/modules/jaeger-config-collector.adoc @@ -21,6 +21,10 @@ The collectors are stateless and thus many instances of Jaeger Collector can be |Configuration options that define the Jaeger Collector. | +|autoscale: +|This parameter controls whether to enable/disable autoscaling for the Collector. Set to `false` to explicitly disable autoscaling. +|`true`/`false` + |kafka: producer: topic: jaeger-spans @@ -35,5 +39,47 @@ The collectors are stateless and thus many instances of Jaeger Collector can be |log-level: |Logging level for the collector. -|Possible values: `trace`, `debug`, `info`, `warning`, `error`, `fatal`, `panic`. +|`trace`, `debug`, `info`, `warning`, `error`, `fatal`, `panic` + +|maxReplicas: +|Specifies the maximum number of replicas to create when autoscaling the Collector. +|Integer, for example, `100` + +|num-workers: +|The number of workers pulling from the queue. +|Integer, for example, `50` + +|queue-size: +|The size of the Collector queue. +|Integer, for example, `2000` + +|replicas: +|Specifies the number of Collector replicas to create. +|Integer, for example, `5` |=== + + +== Configuring the Collector for autoscaling + +You can configure the Collector to autoscale; the Collector will scale up or down based on the CPU and/or memory consumption. Configuring the Collector to autoscale can help you ensure your Jaeger environment scales up during times of increased load, and scales down when less resources are needed, saving on costs. You configure autoscaling by setting the `autoscale` parameter to `true` and specifying a value for `.spec.collector.maxReplicas` along with a reasonable value for the resources that you expect the Collector’s pod to consume. If you do not set a value for `.spec.collector.maxReplicas` the Operator will set it to `100`. + +By default, when there is no value provided for `.spec.collector.replicas`, the Jaeger Operator creates a Horizontal Pod Autoscaler (HPA) configuration for the Collector. For more information about HPA, refer to the link:https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/[Kubernetes documentation]. + +The following is an example autoscaling configuration, setting the Collector’s limits as well as the maximum number of replicas: + +.Collector autoscaling example +[source,yaml] +---- +apiVersion: jaegertracing.io/v1 +kind: Jaeger +metadata: + name: simple-prod +spec: + strategy: production + collector: + maxReplicas: 5 + resources: + limits: + cpu: 100m + memory: 128Mi +---- diff --git a/modules/jaeger-config-ingester.adoc b/modules/jaeger-config-ingester.adoc index 3fa0ca996e..a185d88dcf 100644 --- a/modules/jaeger-config-ingester.adoc +++ b/modules/jaeger-config-ingester.adoc @@ -10,51 +10,46 @@ Ingester is a service that reads from a Kafka topic and writes to another storag .Jaeger Ingester parameters [options="header"] -[cols="l, a, a, a"] +[cols="l, a, a"] |=== -|Parameter |Description |Values |Default value +|Parameter |Description |Values |spec: strategy: streaming ingester: options: {} |Configuration options that define the Ingester service. | -| -|ingester: - options: - kafka: - consumer: - topic: +|autoscale: +|This parameter controls whether to enable/disable autoscaling for the Ingester. Autoscaling is enabled by default. Set to `false` to explicitly disable autoscaling. +|`true`/`false` + +|kafka: + consumer: + topic: |The `topic` parameter identifies the Kafka configuration used by the collector to produce the messages, and the ingester to consume the messages. -|Label for the consumer. For example, `jaeger-spans` -| +|Label for the consumer. For example, `jaeger-spans`. -|ingester: - options: - kafka: - consumer: - brokers: +|kafka: + consumer: + brokers: |Identifies the Kafka configuration used by the Ingester to consume the messages. |Label for the broker, for example, `my-cluster-kafka-brokers.kafka:9092`. -| |ingester: - options: - ingester: - deadlockInterval: + deadlockInterval: | Specifies the interval (in seconds or minutes) that the Ingester should wait for a message before terminating. The deadlock interval is disabled by default (set to 0), to avoid the Ingester being terminated when no messages arrive while the system is being initialized. -|Minutes and seconds, for example, `1m0s`. -|0 +|Minutes and seconds, for example, `1m0s`. Default value is `0`. -|options: - log-level: +|log-level: |Logging level for the Ingester. |Possible values: `trace`, `debug`, `info`, `warning`, `error`, `fatal`, `panic`. -| -|=== +|maxReplicas: +|Specifies the maximum number of replicas to create when autoscaling the Ingester. +|Integer, for example, `100`. +|=== .Streaming Collector and Ingester example [source,yaml] @@ -85,3 +80,28 @@ spec: es: server-urls: http://elasticsearch:9200 ---- + +== Configuring Ingester for autoscaling + +You can configure the Ingester to autoscale; the Ingester will scale up or down based on the CPU and/or memory consumption. Configuring the Ingester to autoscale can help you ensure your Jaeger environment scales up during times of increased load, and scales down when less resources are needed, saving on costs. You configure autoscaling by setting the `autoscale` parameter to `true` and specifying a value for `.spec.ingester.maxReplicas` along with a reasonable value for the resources that you expect the Ingester's pod to consume. If you do not set a value for `.spec.ingester.maxReplicas` the Operator will set it to `100`. + +By default, when there is no value provided for `.spec.ingester.replicas`, the Jaeger Operator creates a Horizontal Pod Autoscaler (HPA) configuration for the Ingester. For more information about HPA, refer to the link:https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/[Kubernetes documentation]. + +The following is an example autoscaling configuration, setting the Ingester’s limits as well as the maximum number of replicas: + +.Ingester autoscaling example +[source,yaml] +---- +apiVersion: jaegertracing.io/v1 +kind: Jaeger +metadata: + name: simple-streaming +spec: + strategy: streaming + ingester: + maxReplicas: 8 + resources: + limits: + cpu: 100m + memory: 128Mi +----