Distributing Worker Load on Different Servers
This documentation provides guidance on using Helm charts to distribute workloads across designated nodes in Kubernetes by leveraging node affinity settings.
In Kubernetes, affinity is a mechanism that allows you to specify rules for scheduling pods on particular nodes based on custom requirements, such as node labels, to optimize resource allocation and performance.
Configuration
Each worker and API component has its own dedicated affinity section in the values.yaml
file, allowing you to
define custom affinity rules for scheduling. These sections specify node preferences and requirements, enabling you to
control the distribution of workloads across different nodes based on specific criteria such as node labels, zone, or
instance type.
By configuring affinity settings within each component’s section, you can ensure that workers, API instances, and other services are distributed effectively to meet resource and performance needs.
For example:
- The
api.private.nodeAffinity
andapi.public.nodeAffinity
sections control node placement for private and public API instances. - The
worker.background.nodeAffinity
,worker.collector.nodeAffinity
, andworker.workflow.nodeAffinity
sections allow you to set rules for various worker types.
These configurations make it possible to tailor pod deployment based on node characteristics, helping optimize workload management across the Kubernetes cluster.
Affinity-Related Configuration Examples
These are examples for node affinity configuration.
-
API Private Node Affinity (
api.private.nodeAffinity
): -
API Public Node Affinity (
api.public.nodeAffinity
): -
TMS Node Affinity (
tms.nodeAffinity
): -
TMS GUI Node Affinity (
tmsGui.nodeAffinity
): -
Worker Background Node Affinity (
worker.background.nodeAffinity
): ```yaml worker: background: ...the same as above -
Worker Collector Node Affinity (
worker.collector.nodeAffinity
): -
Worker Workflow Node Affinity (
worker.workflow.nodeAffinity
): -
APM Profile Node Affinity (
apm.profile.nodeAffinity
): -
Upgrade Worker Node Affinity (
upgrade.nodeAffinity
): -
Queue Bridge Node Affinity (
bridge.queue.nodeAffinity
):