Puppet agents and masters communicate over HTTPS, exchanging structured data in JSON, or PSON which allows binary data.
Msgpack is an efficient serialization protocol that behaves similarly to JSON. It provides faster and more robust serialization for agent-master communications, without requiring many changes in our code.
Enabling Msgpack serialization
Enabling msgpack is easy, but first, it must be installed because the gem is not included in the puppet-agent or puppetserver packages.
- Install the msgpack gem on your master and all agent nodes.
If you are using the Puppet Enterprise test environment, make sure to use PE gem command instead of the system gem command.On *nix nodes, run the following command:
/opt/puppetlabs/puppet/bin/gem install msgpackOn Windows nodes, run the following command:
"C:\Program Files\Puppet Labs\Puppet\sys\ruby\bin\gem" install msgpackOn Puppet Server, run the following command and then restart the Puppet Server service:
puppetserver gem install msgpack
- In the
puppet.confon any number of agent nodes, set the
Once this is configured, the Puppet master server will use msgpack when serving any agents that have
preferred_serialization_format set to
msgpack. Any agents without that setting will continue to receive PSON as normal.