Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jask concurrency control #7

Open
HZ89 opened this issue Dec 6, 2017 · 1 comment
Open

Jask concurrency control #7

HZ89 opened this issue Dec 6, 2017 · 1 comment
Labels
Milestone

Comments

@HZ89
Copy link
Owner

HZ89 commented Dec 6, 2017

Description

A job executing on a large number of nodes at the same time will cause excessive concurrency to other systems on which the job itself depends, requiring a way to control the concurrency of the job.

Design

  • Job object to add concurrency attributes
  • The server generates a token counter according to the value of concurrency when the job can be triggered
  • When an agent is ready to perform a job try to get the token, if successful do it, else to wait for a cycle of retry
@HZ89 HZ89 added this to the v0.3 milestone Dec 6, 2017
@HZ89 HZ89 added the features label Dec 6, 2017
@HZ89
Copy link
Owner Author

HZ89 commented Dec 13, 2017

Implementation

  • concurrency status save to etcd. In case a server is down it loses concurrency control
  • server start some goroutine and assign a job status to a fixed one of the gorountine maintenance
  • modify grpc service job.GetJob and job.ExecDone, add the token's distribution and recycle logic
  • when an agent make a job.GetJob rpc call, server reduce concurrency first. if succeed return job obj, if not sleep a well and retry, until this is succeed.

@github-staff github-staff deleted a comment from 1291945816 Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant