caddy-dynamicdns icon indicating copy to clipboard operation
caddy-dynamicdns copied to clipboard

Add HA support.

Open blmhemu opened this issue 2 years ago • 4 comments

Example Scenario Two caddy instances on different hosts with ips 11.11.11.11 and 11.11.11.12 . Need to insert DNS records for both the IPs (for dns load balancing).

Notes I understand I might be opening a can of worms (multi instance coordination, distributed systems etc.). But thought of giving it a shot.

blmhemu avatar Jul 28 '23 19:07 blmhemu

Hoo boy.

Current design of this plugin is only for simple deployments.

We could discuss a design that enables use in HA environments though.

mholt avatar Jul 28 '23 19:07 mholt

I was thinking along the lines of serf + keepalived Serf: To infect membership details. Keepalived (or a version of keepalived) to select the "active" instance (in say a 3 member HA deployment) which can check for dns entries and place them.

I realize, I might be treading in the territory of consul (serf + raft).

blmhemu avatar Aug 02 '23 07:08 blmhemu

I think it would probably be best if you fork this plugin to implement this yourself as a redesign. I don't think we'll have time to tackle this kind a project, and I doubt it's a feature we'll every need ourselves so there's not much value in us spending time on it (unless it's sponsored/paid for).

francislavoie avatar Aug 02 '23 12:08 francislavoie

Yeah, that seems like a lot of work. Forking the project to implement this seems like a good approach, and then if you like the implementation you can make a PR and we can decide whether it's a good fit to be merged in.

mholt avatar Aug 02 '23 17:08 mholt