Hello, I would like to ask what to pay attention to, when someone wants to set up multiple PuppetDB instances (and point them to the same DB), and put them behind a proxy/load balancer, as mentioned in the documentation<http://docs.puppetlabs.com/puppetdb/1/scaling_recommendations.html#bottleneck-single-point-of-failure> . Can this cause some concurrency issues with the message queues? If someone has experience in this matter, please do share! :) Thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/_eeQm15UFegJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> I would like to ask what to pay attention to, when someone wants to set up > multiple PuppetDB instances (and point them to the same DB), and put them > behind a proxy/load balancer, as mentioned in the documentation. > Can this cause some concurrency issues with the message queues?What do you mean by ''concurrency issues''? ken. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I assume that each PuppetDB instance maintains its own message queue, and commands sent by the master wait in these queues. In that case, is the following scenario possible: - the master sends facts for a node to PuppetDB through the load balancer - the load balancer gives the task to PuppetDB1 - queue processing halts/gets delayed on PuppetDB1 (for some reason) - upon the next pupptrun, the agent on the same node sends some changed facts to master - the master sends it to PupetDB through the load balancer - the load balancer gives the task to PuppetDB2 - PuppetDB2 writes the fact to the DB - some time later PuppetDB1 continues to process its queue - PuppetDB1 writes the old fact value to the DB If i were to query PuppetDB for this fact for this node now, which value would I get? On Tuesday, January 22, 2013 4:03:14 PM UTC+1, Ken Barber wrote:> > > I would like to ask what to pay attention to, when someone wants to set > up > > multiple PuppetDB instances (and point them to the same DB), and put > them > > behind a proxy/load balancer, as mentioned in the documentation. > > Can this cause some concurrency issues with the message queues? > > What do you mean by ''concurrency issues''? > > ken. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/08kaREXWCUgJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> I assume that each PuppetDB instance maintains its own message queue, and > commands sent by the master wait in these queues.Yes, today this is true.> In that case, is the following scenario possible: > - the master sends facts for a node to PuppetDB through the load balancer > - the load balancer gives the task to PuppetDB1 > - queue processing halts/gets delayed on PuppetDB1 (for some reason) > - upon the next pupptrun, the agent on the same node sends some changed > facts to master > - the master sends it to PupetDB through the load balancer > - the load balancer gives the task to PuppetDB2 > - PuppetDB2 writes the fact to the DB > - some time later PuppetDB1 continues to process its queue > - PuppetDB1 writes the old fact value to the DBThe last step won''t happen with 1.0.5 at least, we check this first and silently drop the ''replace facts'' if the timestamp associated with the stored facts are newer then the message: https://github.com/puppetlabs/puppetdb/blob/master/src/com/puppetlabs/puppetdb/command.clj#L341 You can see this timestamp of the existing facts in the table ''certname_facts_metadata''.> If i were to query PuppetDB for this fact for this node now, which value > would I get?The latest facts, in this case the facts sent to PuppetDB2. To answer your original question, its recommended to have multiple PuppetDB instances in front of a reverse proxy or load-balancer if you want to provide redundancy. For the database you can review the documentation available on the Postgresql site, as there are many solutions with various pros and cons: http://www.postgresql.org/docs/9.2/static/high-availability.html. Check out the documentation available from our website as it covers scaling in a general manner: http://docs.puppetlabs.com/puppetdb/1.1/scaling_recommendations.html ken. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.