Feature #5306

SimpleRPC requests should support targeting a subset of nodes

Added by R.I. Pienaar over 1 year ago. Updated over 1 year ago.

Status:Closed Start date:11/15/2010
Priority:Normal Due date:
Assignee:R.I. Pienaar % Done:

0%

Category:SimpleRPC
Target version:1.0.0
Keywords: Affected mCollective version:0.4.10
Branch:https://github.com/ripienaar/marionette-collective/tree/5306_single_target
Votes: 0

Description

SimpleRPC should support doing a discovery and then picking a node from the results. A custom_request should be constructed that then only send the request to the one node.

The use case is for agents like ones providing notification services to the network so that mcollective can be used as a HA RPC system and not just a multicast system.

The selection should be configurable that you can pick a random node from the result or the first one that responded which should roughly translate to the nearest provider of a service.

History

Updated by Paul Lathrop over 1 year ago

It would be great if this were more general so you could specify a specific number of nodes or a percentage of nodes.

Updated by R.I. Pienaar over 1 year ago

  • Branch set to https://github.com/ripienaar/marionette-collective/tree/5306_single_target

First stab at this that supports -1 and —one in ripienaar/5306_single_target

Updated by R.I. Pienaar over 1 year ago

Have added two options:

  • -1 or —one which will just send to one single node out of the discovered ones
  • —limit-nodes or —ln which can be either a number or a percentage like 10%

This will do a discovery to find all available nodes and then pick a subset based on the above

A config option for rpclimitmethod was added that can be first or random to influence the logic for picking the nodes

More testing required but the code is pretty close to ready

Updated by R.I. Pienaar over 1 year ago

  • Subject changed from SimpleRPC requests should support targeting just one discovered node to SimpleRPC requests should support targeting a subset of nodes

Updated by R.I. Pienaar over 1 year ago

  • Status changed from Accepted to Closed

Commit 19c95ffd329089ca78b9 on development

Also available in: Atom PDF