Open source Puppet documentation

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 should provide faster and more robust serialization for agent-master communications, without requiring many changes in our code.

Important: When msgpack is enabled, the Puppet master and agent will communicate using msgpack instead of PSON.

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.

  1. 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 msgpack
    On Windows nodes, run the following command:
    "C:\Program Files\Puppet Labs\Puppet\sys\ruby\bin\gem" install msgpack
    On Puppet Server, run the following command and then restart the Puppet Server service:
    puppetserver gem install msgpack
  2. In the [agent] or [main] section of puppet.conf on any number of agent nodes, set the preferred_serialization_format setting to msgpack.

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.

Back to top