Would it be not interesting to implement Clustering in Pihole so to sync 2 or more redundant instaces of Pihole?
Clustering and syncing are two entirely different things.
Do you mean clustering like below?
Because thats not an easy feat to set it up right.
I've done several with RH6 in the days (not with Pi-hole) and there is allot involved like heartbeats, heuristics, quorum, voting, fencing, bonding and a cluster FS.
EDIT: If you want to have a taste of it,
grab a hypervisor that has fencing capabilities for its guests/VM's;
create three RH/CentOS/AlmaLinux/RockyLinux guests;
arrange some shared iSCSI storage (can use GFS2);
and follow the doc link I posted above ^
Sorry for my bad request.
What i meant to say is implement sync of 2 or more instances of Piehole without having to use external tools like the discontinued Gravity Sync or similar programs running in containers.
Did I explain it right this time?
No apologies needed.
Things can be a bit confusing.
And clusters can be setup in different ways eg Kubernetes etc.
The Pi-hole v6 release already facilitates syncing most all via the API.
I believe syncing DHCP leases is an obstacle though but am not certain about that!
But I guess you want something in the webGUI?
Better adjust the title of this FR and be more specific in the OP about how you envision this syncing?
Thank you First for your post my friend. I will try to explain.
I have 2 Piholes on my network, one is for redundancy and before version 6 i was using Gravity Sync to keep everything the same on both.
Now Gravity Sync is not working with Pihole 6 and is a discontinued project.
Would be nice if Piholes had a function that maintains the same updates of blocklist, whitelist, settings etc. to have both in sync.
There are alternatives like Nebula Sync but it needs to run on a Docker and a separate server.
I prefer to know what changed, and make a decision on the importance.
There was a bash based sync script I found that might work. I don’t recall the name, but it was on github. I messed around with it, seemed reasonably configurable with regards to what to sync, and used the teleporter api to do the work.
There were a couple of gotchas, as it supposedly handled authenticated/unauthenticated API access, but I could not get the unauthenticated approach to work without changing the script. At that point, I just wrote a bash based service that detects the changes I’m interested in syncing, and notifies me of a potential sync being needed. After that it’s up to me to decide if settings and other things I’m interested in actually require syncing.
No muss, no fuss, and in the months it has run, I’ve had a few notifications, that did not require action, other than me adding/removing a couple of block lists. Fits my needs, and works without using the API.
Oh, and should my Pi-hole handling my DHCP fail, I have the DHCP bits in the configuration file in sync already, but have DHCP disable on the 2nd system. Should the first fail, I can always enable and be close to what I had, or at least that’s the theory.
I have similar scenario. My services run in different servers. I have 2 vms running pihole (pihole01 and pihole02). Sometimes I need to run an update in one of the servers, and I want the network to remain functional. So my DHCP configures all clients with both dns servers. Everytime I add a new Local DNS entry, I have to do on both.