Using MessagePack serialization
Running Puppet in a centralized architecture creates a lot of traffic between nodes. The bulk of this traffic is JSON and yaml data. An experimental feature of the latest releases of Puppet allow for the serialization of this data using MessagePack (msgpack).
Getting ready
Install the msgpack gem onto your Puppet master and your nodes. Use Puppet to do the work for you with Puppet resource. You may need to install the ruby-dev
or ruby-devel
package on your nodes/server at this point:
t@ckbk:~$ sudo puppet resource package msgpack ensure=installedprovider=gem Notice: /Package[msgpack]/ensure: created package { 'msgpack': ensure => ['0.5.8'], }
How to do it...
Set the preferred_serialization_format
to msgpack
in the [agent]
section of your nodes puppet.conf
file:
[agent] preferred_serialization_format=msgpack
How it works...
The master will be sent this option when the node begins communicating with the master. Any classes that support serialization with msgpack
will be transmitted with msgpack.Serialization
of the data between nodes and the master will in theory increase the speed at which nodes communicate by optimizing the data that is travelling between them. This feature is still experimental.