-
Notifications
You must be signed in to change notification settings - Fork 0
Add distributed execution support via Redis #5
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Problem
Currently, vulnz runs providers sequentially or with goroutine-based parallelism on a single machine. For large-scale deployments (e.g., enterprise vulnerability management pipelines), distributed execution across multiple workers would enable:
- Horizontal scaling of provider runs
- Resilience against single-node failures
- Load balancing across geographic regions
Proposed Solution
Implement distributed execution using Redis as the coordination layer:
Architecture
- Task Queue: Redis list/streams for provider execution tasks
- Worker Pool: Multiple vulnz instances consuming from the queue
- Result Aggregation: Centralized storage (S3, PostgreSQL, or shared NFS)
- Status Tracking: Redis hashes for task state (pending, running, completed, failed)
Key Components
internal/distributed/- New package for distributed executioninternal/distributed/queue.go- Redis queue implementationinternal/distributed/worker.go- Worker goroutine consuming tasksinternal/distributed/coordinator.go- Task distribution and result collection
Configuration
executor:
mode: distributed
distributed:
redis_url: "redis://localhost:6379/0"
worker_id: "worker-1"
result_store: "s3"
s3:
bucket: "vulnz-results"
region: "eu-west-1"Acceptance Criteria
- Redis queue implementation for task distribution
- Worker mode that consumes and executes providers
- Result aggregation to centralized storage
- Status tracking visible via
vulnz statuscommand - Graceful shutdown and task re-queueing on worker failure
- Tests with Redis testcontainers or mock
Additional Context
This is a larger feature that would significantly enhance vulnz for enterprise deployments. The single-machine executor (internal/provider/executor.go) should remain as the default mode.
Labels: enhancement, help wanted
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed