{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/10880","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/10880/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/10880/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/10880/events","html_url":"https://github.com/nodejs/node/issues/10880","id":201664179,"number":10880,"title":"RFC cluster: make scheduler pluggable","user":{"login":"cjihrig","id":2512748,"avatar_url":"https://avatars.githubusercontent.com/u/2512748?v=3","gravatar_id":"","url":"https://api.github.com/users/cjihrig","html_url":"https://github.com/cjihrig","followers_url":"https://api.github.com/users/cjihrig/followers","following_url":"https://api.github.com/users/cjihrig/following{/other_user}","gists_url":"https://api.github.com/users/cjihrig/gists{/gist_id}","starred_url":"https://api.github.com/users/cjihrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjihrig/subscriptions","organizations_url":"https://api.github.com/users/cjihrig/orgs","repos_url":"https://api.github.com/users/cjihrig/repos","events_url":"https://api.github.com/users/cjihrig/events{/privacy}","received_events_url":"https://api.github.com/users/cjihrig/received_events","type":"User","site_admin":false},"labels":[{"id":155267477,"url":"https://api.github.com/repos/nodejs/node/labels/cluster","name":"cluster","color":"f7c6c7","default":false},{"id":207445406,"url":"https://api.github.com/repos/nodejs/node/labels/feature%20request","name":"feature request","color":"0D7BDE","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-01-18T19:08:21Z","updated_at":"2017-02-17T00:24:01Z","closed_at":null,"body":"* **Version**: Future versions\r\n* **Platform**: All\r\n* **Subsystem**: cluster\r\n\r\nI believe a few people have asked for this directly and indirectly in the past. It would be nice to be able to customize the cluster master's scheduling policy. For example, I've seen people request the ability to \"pause\" a worker.\r\n\r\nOne possibility is to define a custom scheduling policy, and let the user pass in a constructor like our existing `SharedHandle` or `RoundRobinHandle`. Users would need to define a constructor function, `add()` method, and `remove()` method. I put together a small proof of concept, including example usage, in https://github.com/cjihrig/node-1/commit/427beec00cea49e7199eac065eb596224ad18677.\r\n\r\nThe downside is that it exposes some internal ugliness like the constructor function taking `key`, `address`, `port`, `addressType`, `fd`, and `flags` arguments. A simpler alternative might be to only require the user to define a scheduling function like `RoundRobinHandle#distribute()` and then use that with the `RoundRobinHandler` unless the `SharedHandle` is used.\r\n\r\nThoughts?\r\n"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/280510269","html_url":"https://github.com/nodejs/node/issues/10880#issuecomment-280510269","issue_url":"https://api.github.com/repos/nodejs/node/issues/10880","id":280510269,"user":{"login":"redonkulus","id":193272,"avatar_url":"https://avatars.githubusercontent.com/u/193272?v=3","gravatar_id":"","url":"https://api.github.com/users/redonkulus","html_url":"https://github.com/redonkulus","followers_url":"https://api.github.com/users/redonkulus/followers","following_url":"https://api.github.com/users/redonkulus/following{/other_user}","gists_url":"https://api.github.com/users/redonkulus/gists{/gist_id}","starred_url":"https://api.github.com/users/redonkulus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redonkulus/subscriptions","organizations_url":"https://api.github.com/users/redonkulus/orgs","repos_url":"https://api.github.com/users/redonkulus/repos","events_url":"https://api.github.com/users/redonkulus/events{/privacy}","received_events_url":"https://api.github.com/users/redonkulus/received_events","type":"User","site_admin":false},"created_at":"2017-02-17T00:24:01Z","updated_at":"2017-02-17T00:24:01Z","body":"@cjihrig do you have enough feedback to get started with a PR?"}}
{"actor":{"display_login":"redonkulus"}}