{"id":2640,"date":"2012-06-19T20:42:55","date_gmt":"2012-06-19T19:42:55","guid":{"rendered":"http:\/\/www.devco.net\/?p=2640"},"modified":"2012-06-19T20:55:00","modified_gmt":"2012-06-19T19:55:00","slug":"mcollective-direct-addressing-mode","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2012\/06\/19\/mcollective-direct-addressing-mode.php","title":{"rendered":"MCollective Direct Addressing Mode"},"content":{"rendered":"

As mentioned in my first post in this series<\/a> I will be covering new MCollective features that were introduced with version 2.0.0 or later. Today I’ll talk about the biggest new feature called Direct Addressing<\/em>.<\/p>\n

The Past – Broadcast Only Mode<\/H3>
\nIn the past MCollective only had one mode of communication. It would send a broadcast message to all nodes with the target agent in a named group (subcollective) and this message would have a filter attached that nodes will validate to determine if they should run the action. Basically if I send a message with a filter “country=uk” all machines will get it and validate this filter, the ones that match will act on the message.<\/p>\n

This mode is the first problem I set out to solve – a way to have a broadcast based zero config RPC system that can address many machines in parallel with a new style of addressing. I wanted to get the broadcast model right first and I wanted to get the RPC structures right as well before looking at other possibilities.<\/p>\n

There were many 1:1 RPC systems before and it’s not a very hard problem to solve if you have a queue – but it was not the problem I set out to solve as my first target. MCollective 1.2.1 and older did not have a 1:1 mode.<\/p>\n

The parallel mode works fine in many scenarios, specifically this is the only real way to build a central coordinator that degrades well in split brain scenarios since addressing is done by discovery and only discovered nodes are expected to reply. It’s a new paradigm – one thats better suited for distributed applications since failure is inevitable you may as well code your applications to always work in that environment. <\/p>\n

I think MCollective solved that problem well in the past but the very nature of that mode of communication means it is not suitable for all use cases. The unsuitable usage include some of the points below but there are of course others:<\/p>\n