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

Worker Locality #1

Closed
edwardcapriolo opened this issue Nov 17, 2013 · 2 comments
Closed

Worker Locality #1

edwardcapriolo opened this issue Nov 17, 2013 · 2 comments

Comments

@edwardcapriolo
Copy link
Owner

Currently the Worker scans ZK looking for new Plans on an interval and if it has available slots attempts to start a worker for that plan.

We should have support for locality, meaning a Worker should be able to determine how "close" it is to the partition of a Feed. If it is "far" it might wait a few scans before taking the job, or potentially never take it at all.

I see this feature adding some information to the Plan object tot turn off/on. Some information to the feed object, and changing the logic in the worker.

@edwardcapriolo
Copy link
Owner Author

The current more immediate problem is getting a more even splay of the tasks across nodes. Depending on node start up times a node could easily have all the partitions of a particlular plan.

A plan will have a new optional property: maxWorkersPerNode (int). This setting will ensure in the trivial case that tasks get splayed out to different nodes as currently the worker polling only results in an optimistic splay.

Feed do not have a known number of partitions it is calculated by the instance of the Feed at runtime. However each Plan does support maxWorkers.

If maxWorkersPerNode * number of live nodes < maxWorkers some partitions will not be consumed. So potentially in that case we can avoid the rule

@edwardcapriolo
Copy link
Owner Author

Solved for now in edwardcapriolo/teknek-core#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant