https://www.puppet.com/community logo
Join Slack
Powered by
# choria
  • r

    ripienaar

    02/11/2025, 4:57 PM
    ok 🙂
  • n

    nate

    02/19/2025, 4:52 PM
    from the docs, it seems like if you're using default SRV discovery, you don't need to define anything for
    plugin.choria.middleware_hosts
    in server config. as long as SRV records exist for broker(s), it should work, right?
  • r

    ripienaar

    02/19/2025, 5:19 PM
    probably 🙂 i think so - though SRV records have a bit of a flaw in that they never update till restart, so if you expect to use them for their dynamic nature rather than their just ease of config it might not be too hot
  • l

    Lumiere

    02/19/2025, 5:23 PM
    that seems like a bug 🙂
  • l

    Lumiere

    02/19/2025, 5:24 PM
    one I am happy to hear about because I would be almost sure to use SRV when I actually do choria (because my puppet uses srv_domain already)
  • r

    ripienaar

    02/19/2025, 5:28 PM
    for things like access to puppetdb and such it updates
  • r

    ripienaar

    02/19/2025, 5:29 PM
    but for the nats connection - this is a short coming in the nats client libraries - it doesnt update
  • r

    ripienaar

    02/19/2025, 5:29 PM
    and I've tried for years to get people to prioritise this but seems we're one of the v.few/only ones using that
  • n

    nate

    02/19/2025, 5:41 PM
    ah, so all the choria-servers need to restart, which they should do via puppet when we remove that middleware line from the config
  • r

    ripienaar

    02/19/2025, 5:41 PM
    yeah
  • r

    ripienaar

    02/19/2025, 5:42 PM
    but what i am getting at is also - even if you update the SRV records, it wont re-resolve them till next restart
  • r

    ripienaar

    02/19/2025, 5:42 PM
    which is terrible
  • r

    ripienaar

    02/19/2025, 5:42 PM
    specifically for the brokers
  • n

    nate

    02/19/2025, 5:44 PM
    okay, so a safer approach may be to use a comma separated list of brokers?
  • r

    ripienaar

    02/19/2025, 5:44 PM
    depens on the general stability of your setup yeah
  • r

    ripienaar

    02/19/2025, 5:44 PM
    for many that just wont be an issue cos shit never changes
  • n

    nate

    02/19/2025, 5:44 PM
    minimal config/SRV discovery is fine by me, but if it's better to define the brokers, also no big deal
  • l

    Lumiere

    02/19/2025, 5:45 PM
    does it at least load all of the levels of the SRV record, so if I setup failover to other datacenter systems I can at least restart services to update records?
  • r

    ripienaar

    02/19/2025, 5:46 PM
    i think conceptually choria agent falling over to other DCs is probably a mistake
  • r

    ripienaar

    02/19/2025, 5:46 PM
    not impossible but you really want to keep things local if possible and multi dc clusters have issues unless they are network wise quite near
  • n

    nate

    02/19/2025, 5:47 PM
    oh, also, if you have multiple brokers, but they're not federated, the responses will be different according to the broker, correct?
  • n

    nate

    02/19/2025, 5:47 PM
    we've been operating with just a single broker, but i'm thinking we may need to federate to add a broker or two.
  • r

    ripienaar

    02/19/2025, 5:48 PM
    if you just want an in-dc cluster of 3 no federation, they peer and form a cluster and have full HA
  • r

    ripienaar

    02/19/2025, 5:49 PM
    you can spread them over AZs etc
  • n

    nate

    02/19/2025, 5:49 PM
    well, at the moment, it's one broker in a vm on-prem, and one in ec2. we'll most likely end up with 1 or maybe a few in ec2 and none on-prem.
  • r

    ripienaar

    02/19/2025, 5:50 PM
    whats the latency between the 2 locatiojns?
  • n

    nate

    02/19/2025, 5:50 PM
    haven't checked, but it's not bad. connectivity is via direct connect to the vpc.
  • r

    ripienaar

    02/19/2025, 5:50 PM
    ok, yeah 3 brokers one per AZ should be fine
  • r

    ripienaar

    02/19/2025, 5:50 PM
    agent->broker can have latency, broker->broker for clustering should be low
    👍 1
  • r

    ripienaar

    02/19/2025, 5:51 PM
    in theory broker-broker can be like 100ms, but i am not a fan of that