Intelligent DNS, Load Balancing with ISPConfig?

Discussion in 'General' started by TonyG, May 11, 2022.

  1. TonyG

    TonyG Active Member

    I'm trying to understand how we might be able to do load balancing - routing of traffic based on client locale, similar to Cloudflare Load Balancing. For example, when a request is made from Australia, process it with an Australian server rather than from Europe or USA.

    If we can identify a client's locale in a BIND request, I'm wondering if we could then return an "A" record for a server that is closer to that locale. So, might anyone be using ISPConfig with BIND configured to return dynamic RR data ("A" Records) rather than static data from zone files? BIND supports hooks in query processing. (refs: docs, hooks.h) Is there something more built-in, more direct, standard, supported?

    There's probably a better way to approach this. Suggestions?

    I understand that this also requires application work, sync's of file system and/or database(s), etc.. Let's ignore that for now and focus on the DNS.

  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Kinda sound weird to me because A record is fixed and not dynamic but may be it's best if you could draw a diagram and explaining what algorithms you wish to use in this load balancing schematic.
  3. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Just setting up the views is pretty straightforward, if you manage the zones outside of ispconfig; trying to use ispconfig to manage the DNS and have multiple versions of the same zone is not going to work out of the box.
  5. TonyG

    TonyG Active Member

    @nhybgtvfr - You nailed it, thanks. The Views concept is exactly what I was looking for.
    @ahrasis - I'm essentially describing the behaviour of a CDN. There are many DIY CDN tools but I was thinking this would be ideal in conjunction with ISPConfig.
    Note, "behaviour of a CDN", not "CDN functionality". That is, I'm looking to load balance common dynamic sites based on geolocation, not to provide static content, which complicates the synchronisation and that's why I wanted to ignore that as a factor.

    I'll pursue more research as time permits but I understand this is currently out of scope for ISPConfig.

    Thanks all for your feedback.
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    You mentioned nothing about CDN nor its behaviour and load balancing is clearly a different thing altogether, so I don't think I was confused at all.

    I still think your opening post sound weird especially without providing any diagrams and explaining what algorithms you wish to use in this load balancing schematic.

    And yes, you should do research.

    It is already possible to load balance ISPConfig and websites under it via various ways (tools / softwares) and to load balance websites with dynamic in a location is very easy and straight forward to me.
  7. TonyG

    TonyG Active Member

    Might you provide the name of a related technology? "It is possible" and "is very easy and straight forward to me" sounds great, but doesn't help someone who is asking for specific suggestions.

    Of course we know that, and I differentiated this above. To be clear, a "good" CDN uses the geolocation of the request originator to forward the request to a nearby server for the response. This is a form of dynamic load balancing, as it takes the load off of one server and puts it on another. Local load balancing may not care about the location of the originator, and will just route traffic to different servers in the same data center. Some load balancing servers do factor in the requestor location ... what is that functionality called?

    If there is another name for this, "perhaps geo-based routing?" that I'm not aware of, please forgive, but that's exactly the question I'm asking.

    If anyone here does this with ISPConfig, I'm asking what tooling you use for this - and what this is actually called. @nhybgtvfr linked to geolocation-aware-dns-with-bind and Views. That's freakin awesome. Is there another name, application, or technology to consider? Because I've done some research but I'm still not sure what else to call this ... you can't look up keywords that you don't know. ;)

    Thanks as always.
  8. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    What you want to know is whether ISPConfig dns server may recognize incoming ip and deliver it to its nearest geo-location ip. The answer is no. Others have given you a way but that is all up to you.

    What you may get confused is whether ISPConfig servers and any websites under it can be load balanced, which they already can, but I think this is not your question, or if it is related, you should search the forum and its tutorial as there are already a lot of infos about it.

    Lastly, I am not sure what you want to achieve but CloudFlare has trade secrets in achieving what they have now, so it won't be possible for you to be exactly like CF but you could always do something similar or better, only if you are really up to it.

    To sum up, it is not an easy peasy work and you definitely may not find the answers easy peasy too for any of your questions or related questions, especially if you don't want to draw, write and share them out and then properly manage them piece by piece. Brainstorming they'd say.

    Good luck.
    Last edited: May 29, 2022
  9. TonyG

    TonyG Active Member

    Dude, where is the confusion? Let's say you're in Malaysia and request my site. The main server is in LA, but I have a mirror setup in KL. Both of us might prefer for you to get the local connection. I used the term load balancing, because that effectively balances the user request load. Get that out of your head if it doesn't work for you.

    I'm not looking for "easy". I wouldn't be doing this stuff if I had the delusion that it was easy. I'm asking how it's generally done, that's all. It sounds like BIND Views is the ticket. Do you know of another way?

    C'mon, stop being difficult. The request has been easy to understand - obviously others got it right away. Focus on the intent rather than posturing to denigrate a request. I know that gives you no joy, so stop it. ... and have a great day! :)

Share This Page