how do puppet agent service record and determine next request timepoint?

27 views
Skip to first unread message

羽色云烟

unread,
Oct 14, 2021, 3:51:31 PM10/14/21
to Puppet Users
Background:
Our a puppet server manages lots of agent nodes, it often failed to response in time due to too many requests squeeze in some part of period. We have set 'splay=true' but it seem to do no help. We hope to more pricisely control each node's agent request timepoint, that is, to make them evenly distribute across the run-interval period. But 'systemctl restart puppet.service' does not always trigger the puppet agent request immediately.

So the question are:
1. how do background puppet agent service determine its next request timepoint?
2. suppose 'runinterval=1h', with splay feature disabled, will all the future request time point be fixed exactly at x+1h, x+2h, x+3h, etc... ?
3. at puppet server node, is there any way to list which agent nodes are currently connecting or occupying server's instance, and which nodes are in queue?

Martin Alfke

unread,
Oct 15, 2021, 10:03:05 AM10/15/21
to puppet...@googlegroups.com
Hi,

Running puppet agent as a daemon is not recommended in large environments with many nodes.
We usually recommend running puppet agent from cron instead.

Reason:

When running puppet agent as daemon:
T0 - Puppet agent start
T0+x - Puppet agent finishes. Now waits for runinterval time (default 30 min). Runtime for puppet agent can differ from run to run

When running from cron, we recommend to use the fqdn_rand function to create a random number based on the fqdn. Number will be identical for identical fqdn.
This allows us to spread puppet agent runs in the platform.

In very large environment (more than 4000 nodes) we recommend to add Puppet compilers behind a load balancer.
The CA will still run on the primary server, but load is spread amongst more systems (catalog compilation).

Hth,
Martin


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/59fd2837-9347-4b21-a2d5-79d9af274bb0n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages