Skip to content

fix(backend): smart background processor draining #6094

Open
@windmill-internal-app

Description

@windmill-internal-app

In the backend, for performance purposes, we have a background processor that can queue jobs in a backgroud processor to be sent to v2_job_completed table so that fetching job can be done in a pipeline fashion. We have a limit of 100 jobs on it which work well and apply backpressure. However, in case where latency start to increase when inserting jobs, to avoid snowball effect, we also want to measure the time it takes for the last job to go from being queued in that bg processor there to being inserted in the table. When it goes above > 5s, we drain the queue and only process jobs again when that queue is fully drained.. Request made by @rubenfiszel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions