PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.7k stars 908 forks source link

dnsdist: remote cache support or shared cache support for multi dnsdist usage #12946

Open mayeter opened 1 year ago

mayeter commented 1 year ago

Short description

Hi, I've checked open and closed issues to see if this was requested before but I couldn't catch anything. I needed dnsdist to store the packetcache in a visible place. By "remote" I meant something like etcd or memcached, or even a simple text file would work for me.

Usecase

In my setup, I have multiple dnsdists and bird routing daemon to provide an anycast ip for the clients. This allows me to put as many instance as I want behind the same IP address. Bird takes care of BGP stuff and anycast IP address is binded to loopback of each instance. So its kinda like 1.1.1.1 or 8.8.8.8

Here is the problem, imagine a client asks - lets say - powerdns.com and one of my dnsdist resolved and cached x.x.x.x IP address, then client made http request to x.x.x.x, when firewall get this it also resolves powerdns.com but it gets y.y.y.y IP address, so access is denied.

This is the most basic need I'm having right now. I need my dnsdist servers to share a packetcache object somehow.

Description

Possible solutions to this problem I could think of are: a thirdparty application like etcd or memcached for every dnsdist to interact with, a sql or nosql database (would be overkill I guess), dnsdists can interact each other for packetcache correlation and other stuff (it would be great for scale purposes and saves time, however, would be over engineering just for this problem)

Thanks in advance :pray:

rgacogne commented 1 year ago

Thank you for filling out this feature request. We have no plan to implement such a shared cache for now, but we will of course gladly provide guidance if someone is interested enough to contribute such a feature to dnsdist.