Skip to main content

Queue

This component is responsible for integrating with a queue system based off the configuration provided.

The queue system is used by Vela for pulling workloads, provided by the server, that will be run.

Workloads fetched from the queue are managed with a first in, first out (FIFO) strategy.

Configuration

The following options are used to configure the component:

NameDescriptionRequiredDefaultEnvironment Variables
queue.clusterconfigures the client for a queue clusterfalsefalseQUEUE_CLUSTER`VELA_QUEUE_CLUSTER`
queue.drivertype of client to control and operate queuetrueN/AQUEUE_DRIVER`VELA_QUEUE_DRIVER`
queue.pop.timeouttimeout for requests that pop items off the queuetrue60sQUEUE_POP_TIMEOUT`VELA_QUEUE_POP_TIMEOUT`
queue.routesunique channels or topics for pulling workloadstrue[ vela ]QUEUE_ROUTES`VELA_QUEUE_ROUTES`
note

For more information on these configuration options, please see the worker reference.

Drivers

The following drivers are available to configure the component:

NameDescriptionDocumentation
redisuses a Redis queue for managing workloadshttps://redis.io/

Redis

From the Redis official website:

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

The below configuration displays an example of starting the Vela worker that will connect to a Redis queue:

$ docker run \
--detach=true \
+ --env=VELA_QUEUE_DRIVER=redis \
--env=VELA_SERVER_ADDR=https://vela-server.example.com \
--env=VELA_SERVER_SECRET=<shared-secret> \
--env=VELA_WORKER_ADDR=https://vela-worker.example.com \
--name=worker \
--publish=80:80 \
--publish=443:443 \
--restart=always \
--volume=/var/run/docker.sock:/var/run/docker.sock \
target/vela-worker:latest