Skip to main content

Worker

Workers are background processes that don’t directly respond to HTTP requests. Instead, they focus on internal tasks like data processing, handling queued jobs, or sending email notifications. Similar to Web Services, Workers also run in Kubernetes pods, but they typically operate on event triggers or schedules rather than incoming network requests. For instance, you could have a Worker pod that listens for messages in a queue (e.g., to generate reports) and processes these tasks without any user interaction.

FAQs

How do I set up auto-scaling for my Worker?

To enable auto-scaling, you can set the Autoscaling option to enabled and define the Memory Target and CPU Target. These targets determine the resource usage thresholds that trigger auto-scaling. You must also specify the minimum and maximum number of replicas to be maintained when auto-scaling is enabled.

How can I configure memory and CPU settings for my Worker?

You can configure the CPU Min and CPU Max values to set the minimum and maximum CPU resources each instance in your cluster can use. Similarly, you set Memory Min and Memory Max for memory allocation per instance.

Lets add a Worker for your Project

1. Navigate to create Worker section

Into the Left Pane, access Executions. Then select the Worker tab and then, at the top right corner, click on the Create button.

worker-list

2. Select a Project and a Name for the worker

Start with the basic information, complete these attributes and click Next to continue.

AttributeDescription
NameIdentify your worker.
ProjectSelect between the existent projects.
CommandThe command that runs the worker.

Once those attributes are completed, click the Next button to move forward.

worker-create-1

3. Finish the set up

This step outlines the key attributes for configuring the resources of a Worker in SleakOps, allowing for flexible management of CPU, memory, and scaling behaviors.

AttributeDescription
CPU MinThe minimum amount of CPU resources allocated for each instance in the cluster. This ensures that each instance always has this amount of CPU available.
CPU MaxThe maximum CPU resources that each instance in the cluster can use. This cap helps prevent any single instance from consuming too much CPU.
Memory MinThe minimum amount of memory allocated for each instance in the cluster. This guarantees that the instance has enough memory to operate efficiently.
Memory MaxThe maximum amount of memory each instance in the cluster can utilize. It limits the memory usage to prevent any single instance from overconsuming resources.
AutoscalingToggle to enable or disable auto-scaling. When enabled, it allows the service to adjust the number of replicas based on demand and resource usage.
CPU TargetThe CPU usage percentage target that initiates auto-scaling. If usage exceeds this target, additional replicas may be deployed to balance the load.
Memory TargetThe memory usage percentage target that triggers auto-scaling adjustments. When instances exceed this target, the system scales up to accommodate demand.
Replicas MinThe minimum number of replicas to maintain when auto-scaling is active. A minimum of 2 replicas ensures high availability and prevents downtime.
Replicas MaxThe maximum number of replicas that can be deployed when auto-scaling is enabled. It sets an upper limit on the number of instances to avoid over-provisioning.
worker-create-2

Submit to create and Deploy your worker.