Skip to content

worker unable to receive job when load function return value bigger than 1 #884

Closed as not planned

Description

@Max-Thuc

I found that when load function return value bigger than 1, despite the threshold is bigger than 1, the worker is unable to receive job. I check the server code and found the issue seem to cause by this PR livekit/livekit#3018. You can look at line https://github.com/livekit/livekit/blob/master/pkg/service/agentservice.go#L465. Where the normalizedLoad is calculated by 1 - worker_load. This issue is linked to this issue #834

Activity

  1. davidzhao commented on Oct 10, 2024

    @davidzhao
    Member

    Load should be a float between 0-1, it represents percentage load. it doesn't make sense for workers that are more than 100% utilized to receive more jobs.

  2. Max-Thuc commented on Oct 11, 2024

    @Max-Thuc
    Author

    Hi @davidzhao , thank you for your answer. Should we make it clear in the code by throw some exception if the load threshold is declared bigger than 1

  3. Max-Thuc commented on Oct 11, 2024

    @Max-Thuc
    Author

    Hi @davidzhao , I have one more thing to ask. Do you have a channel where you announce which code version livekit cloud is using?

  4. davidzhao commented on Oct 11, 2024

    @davidzhao
    Member

    Should we make it clear in the code by throw some exception if the load threshold is declared bigger than 1

    I think printing a warning would make sense.. if a developer computes an incorrect value, it seems like their worker should not crash

  5. dmthuc commented on Oct 12, 2024

    @dmthuc
    Contributor

    Should we make it clear in the code by throw some exception if the load threshold is declared bigger than 1

    I think printing a warning would make sense.. if a developer computes an incorrect value, it seems like their worker should not crash

    I see, I've created a PR for this idea here https://github.com/livekit/agents/pull/902/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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