Slashdot Mirror


Mirror Listings Though TXT DNS Records?

mackman asks: "I was wondering if anyone has ever though about using their DNS servers to provide mirror information? A specially formated TXT-record could easily provide a DNS-cache-friendly mirror listing. A TXT-record would just need a list of servers and paths, or perhaps a more complicated mapping for servers which only mirror a subset of the original site. This would allow for much more flexibility than a basic round-robin A-record scheme. For example, instead of pounding the Red Hat web server to get a mirror listing (or relying on Slashdot posts for that matter), why not do a 'dig -t txt mirrors.redhat.com'? Of course we could build this into download managers like wget."

32 comments

  1. Good idea! by root+66 · · Score: 5, Insightful

    This is a very nice idea.
    But for more usability the record should include the location (country and continent) of each mirror, so your favourite download manager can try the nearest mirrors first.

    Another question is how quick such lists would be replicated/cached by your ISP's DNS server...

    --
    -- I love the smell of Blue Screens in the morning.
  2. Interesting... but no by RalphBNumbers · · Score: 1

    It's an interesting idea, especially for the mirroring information, but I really don't think that kind of functionality belongs in a DNS.

    There's alot to be said for keeping something that basic to the working of the internet as we know it as simple as possible.

    Also, if I understand correctly, that kind of thing would increase the load on the domain servers, especially with that sub-site idea. And I just can't see any widespread adoption of that kind of thing anytime soon.

    --
    "The worst tyrannies were the ones where a governance required its own logic on every embedded node." - Vernor Vinge
    1. Re:Interesting... but no by schon · · Score: 4, Insightful

      I really don't think that kind of functionality belongs in a DNS

      Exactly.

      DNS is supposed to provide nameIP mappings, in an application-neutral fashion.

      By trying to make it provide "mirror" information, you're moving into the realm of the application - which doesn't really map properly to the concept of IP address.

      The question (of course) is "mirror for what?"

      HTTP content? Why only HTTP? FTP sites are commonly mirrored as well. How do you distinguish between the two? If you do a lookup for the example provided - "mirrors.redhat.com" - which service is mirrored, the HTTP, or the FTP? How do you know if they have different content? How do you know if they have the same content? And what happens if you have multiple HTTP servers on the same machine? (Say, one running on port 80, and one running on port 8080.)

      Which one gets mirrored? Since you can't do a DNS lookup for "www.redhat.com:8080", this makes it impossible to provide a mirror for anything that doesn't use the WK port.

    2. Re:Interesting... but no by glitchvern · · Score: 3, Informative
      DNS is supposed to provide nameIP mappings, in an application-neutral fashion.

      Then what are these mx records being used to relay mail. That's not exactly application neutral. You can place any random text you want to in a dns record. If you do a host -a you will occasionally come across people who have thrown completely random shit into their dns record. The A record is what is used to resolve a hostname to an ip address. Here is a list of other record types from nslookup(1):
      A the host's Internet address.
      CNAME the canonical name for an alias.
      HINFO the host CPU and operating system type.
      MX the mail exchanger.
      NS the name server for the named zone.
      SOA the domain's ``start-of-authority'' information.
      TXT the text information.
      WKS the supported well-known services.

      Other types (ANY, AXFR, MB, MD, MF, NULL) are described in the RFC-1035 document.

      I seem to recall something about jabber using a dns record similar to mx. A quick google search comes up with this page that claims both ldap and jabber use srv records and that jabber formerly used the mx record.

      So yeah, dns, more than just ip addresses and hostnames.
    3. Re:Interesting... but no by schon · · Score: 2, Informative

      I think it's interesting that you didn't comment at all on any of my real arguments against this, and instead just chose one line to bitch about.

      I said that DNS isn't the proper way to do this, and here's why - and you completely ignored all of the "why"..

      Then what are these mx records being used to relay mail.

      They're used to find the MX for a domain. - To find an IP address, just like I said.

      That's not exactly application neutral.

      Yes, it is. MX records don't include information on where the mail aliases to, or where to find the administrator for a domain (for example). It's used to provide a record for a Domain. (You know, the "D" in DNS.)

      You can place any random text you want to in a dns record

      Just because you can do something, that all of a sudden makes it a good idea to do it?

      By that logic, I bet you can jump off a cliff.

      Here is a list of other record types from nslookup(1)

      What's your point? In every case, the records provide information about the domain, or about a host in that domain. In no case do they provide information about pathnames, mirrors, the name and address of the administrator of the domain, or anything that's handled by an application-specific protocol.

    4. Re:Interesting... but no by MntlChaos · · Score: 1
      Then what are these mx records being used to relay mail.
      They're used to find the MX for a domain. - To find an IP address, just like I said.

      okay. so you use an mx record to find a server that handles mail for that domain. What's wrong with having an FX (file exchanger) record to find a server that handles ftp for that domain? This idea does that without requiring a new standard for dns, by using a currently available field in a DNS record.
    5. Re:Interesting... but no by The+Clockwork+Troll · · Score: 2, Insightful
      DNS is supposed to provide nameIP mappings, in an application-neutral fashion.
      Yes, and the Internet was intended to be a means for scientists and military personnel to exchange information, and HTML was intended to link cross-referenced scientific documents.

      My point is, you can nitpick details about the existing protocols/DNS record types and for what they were originally intended but that doesn't mean it's the wrong type of architecture.

      If you were building a system from the ground up to be a mirror directory for various well-known services it would probably end up looking a bit like DNS in its hierarchy (and probably, semantics).

      That being said, I think the parent post's idea is problematic in more significant regard in that it tries to assign a standard meaning to an unstandardized record type which could only wreak chaos with DNS servers that did not support it.

      I think a more "correct" approach could involve adding an additional record type to DNS that enumerated available mirrors for a host's well-known services that were listed in its WKS records. It could return results similar to an MX query (service [e.g. ftp], host name, priority) along with port and country information.

      --

      There are no karma whores, only moderation johns
  3. How about ENRP? by brianjcain · · Score: 5, Interesting

    Instead of shoehorning in functionality into a free-form field (or so I assume, by its name), why not use something more appropriate? Why not write an I-D about how DNS should include "MIRROR" records? I'll leave it to the mailing lists to debate whether DNS should know so much about a name, and the specifics of what exactly is meant by "mirror" (what content, what protocols, etc.).

    The IETF has some great things cooking. RSerPool, e.g. -- though it's not designed primarily for load-distribution (rather uptime, AFAIK). Perhaps I'm suggesting you use a hammer to crack a nut, but this might abate the need for posting mirrors, like you said.

    Open Source is such a beautiful thing. It's unfortunate that so much of its energy is spent writing competing implementations of various similar protocols. But I digress.

    1. Re:How about ENRP? by torpor · · Score: 2, Informative

      TXT is intended for such things as this. I seem to recall it was originally proposed for 'additional information about the domain'.

      Seems more than appropriate for mirror information to me ...

      --
      ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  4. Already done, of a sort by themo0c0w · · Score: 2, Interesting

    Here at Georgia Tech, the primary campus Unix machines (acmex, acmey, and acmez) go through a "round-robin" DNS resolution process. Each time someone digs to acme.gatech.edu, they get one of the three machines, depending on conditions. Helps load balance the servers and protect against one of them being down, say by a systems student "accidently" fork-bombing the server...

    --
    ph34r teh p0w3r 0f th3 c0w
    1. Re:Already done, of a sort by drudd · · Score: 2, Informative

      I do the same with my webservers (only two) to balance the load, but it's not really a complete solution...

      It provides reasonable load balancing, but isn't fault tolerant (i.e. a server goes down, requests aren't redirected).

      Works well enough for me though...

      Doug

      --
      Venn ist das nurnstuck git und Slotermeyer? Ya! Beigerhund das oder die Flipperwaldt gersput!
  5. Look up what Hesiod can do.. by sudog · · Score: 1

    Just check out the capabilities. It might be the kind of thing you're after.

  6. RFC 2052 by gehrehmee · · Score: 4, Interesting

    http://www.ietf.org/rfc/rfc2052.txt Doesn't do everything, but it definately accomplishes more advanced mirroring & balancing anyways. Combined with a little virtual-hosting on the mirror's side, all that's really missing is partial mirrors, as far as I can see.

    --
    "You know, Hobbes, some days even my lucky rocketship underpants don't help" -- Calvin
    1. Re:RFC 2052 by Anonymous Coward · · Score: 0

      You mean ''definitely.''

  7. Who will impliment it? by jasonrocks · · Score: 2, Insightful

    This idea wouldn't work because people would not implement it. It would take time to set up mirrors in a DNS and then to update them. If you are talking about FTP, some downloaders already search for and accept multiple sites. They also check for proximity of downloads.
    If you are talking about websites like the slashdot effect, good luck on getting anyone to implement and maintain the table. A viable option for slashdot effect would be to mirror it in your journal. Or you could use kazaa.

    --

    void
  8. Re:Finding and choosing the best anopractor by Anonymous Coward · · Score: 0

    where are the damn moderators??

  9. Re:Finding and choosing the best anopractor by Anonymous Coward · · Score: 0

    In the Yellow Pages?
    Look, if you think you can get a job without some serious man-on-man greasy action, I'd like to see it.

  10. Re:Linux is dying by coyote4til7 · · Score: 1

    IDC has a lot of information on their site referring to general cases and specific case, adoption raes vs. current market share, etc., Just quoting this stuff out of context is meaningless.

    It sounds like you're quoting accurately, but years ago I was talking to a guy at a Microcenter who seemed to know what he was talking about. Then he insisted that Apple had gone out of business. I couldn't convince the guy that there was still an operating business at 1 infinite loop. But he _sure_ sounded like he knew what he was talking about.

    How about _specific_ URLs to back up your quotes?

    --

    the clock on the wall says 4 til 7
  11. Go for it! (but don't use TXT) by Ashurbanipal · · Score: 4, Informative

    DNS is designed to be an extensible, flexible, distributed, and massively scaleable lookup database. It is quite suited to what you propose, and has certainly been used for much lamer ideas already.

    I wouldn't use TXT records, though. SRV records might be more appropriate, but people are apparently using SRV for LDAP nowadays so you're probably better off just defining a new type. Use the procedure laid out in the RFCs for designating a new type of "experimental" DNS record, so that everyone will be compatible with you (well, everyone that follows the RFCs, anyway, which might leave out MS and DJB) or figure out how to use one of the obsolete record types.

    You can look at some of the other types of records in RFCs 1035, 1183, 1706, 1886, 2672, 2782, and 2874. Most of the important ones (well, other than IPv6 stuff) are in RFC1035.

    Incidentally, you're going to get dozens (if not hundreds) of posts here that will say "You shouldn't do that with DNS!". Pretty much any question you ask around here that even mentions DNS will get the same result, so just ignore them. I think these people are a lot more interested in shooting down ideas than in actually testing them, which is the only real way to find out if they will work.

  12. An alternative by csmiller · · Score: 2, Interesting
    One alternative way is for the DNS server to guess what country the DNS request is coming from (For most people, the request comes from their ISP's/company's DNS server*) and then to automatically redirect the request to the nearest mirror. E.g. a request from the UK for ftp.debian.org is redirected to ftp.uk.debian.org, which may be round-robined across the UK mirrors. Of course, for HTTP requests this can be handled at the HTTP level.

    The exact method of the guessing is tricky, a rDNS can be used, but it migt be slow, and not all non-US ISPs (or companies) use their country TLD in thier canonical or alias names. The visual-traceroute style locactions might be more accurate, but the lookup time might be prohibitivly expensive.

    * This generally true unless the program does its own lookups (some versions of Netscape), or the machine is running its own DNS server.

    --
    It has become appallingly obvious that our technology has exceeded our humanity. --- Albert Einstein
  13. Why not use HTTP? by jbrayton · · Score: 2, Interesting

    I think HTTP is a better place for this.

    Consider the following:

    • When a web server receives an HTTP request, it knows the IP address of the client. That "Client IP Address" may be a proxy server or a NAT Public IP Address, but that Client IP Address will still usually be the one performing the download. This can be used (with some additional work/expense and questionable reliability) to better determine where the user is coming from.
    • Web browsers can send a language and even a sub-language, such as "en-us" for US English. That gives the server information about the location of the client.
    • Web servers have the ability to issue redirects to web browsers.

    So, you could have a server "downloads.mycompany.com", which takes a request for file "/dir/file.tar.gz", and then issues a redirect to an appropriate download server ("http://useastcoast.downloads.mycompany.com/dir/f ile.tar.gz") based on a number of variables including HTTP headers, Client IP Address, and server load.

    Since the functionality can be implemented on an HTTP server transparent to browsers, I would not be inclined to avoid changing the DNS (or any other) protocol to implement this.

    As a side note, I do think that sites should implement this transparently, whenever possible. I get annoyed when I am asked to "pick a mirror"; I think that is the server's responsibility.

    Just my two cents.

  14. URN by adri · · Score: 1

    Search the RFC/IETF sites for URs or Universal Resource Names.

    Squid implemented some basic URN stuff a while back - It'd run a cgi script at a URL which returned a list of sites in a specific format. Squid would then ping the sites and return them to you w/ the RTTs. You could then choose the 'best one'.

    Not very effective - and I don't think it (the squid side) ever progressed past the initial stages - but maybe its the beginning for someone to tackle this issue again.

    (IMHO it could be made more .. transparent. But then this requires caching servers everywhere and thats a thread I don't really want to get into right now.)

    Note - there's RFCs covering URNs for various things (IETF documents, ISBNs, etc)..

    No, DNS isn't really designed for this. Yes, DNS has been perverted enough, so I guess this'd just be another extension. Write an RFC, get it published.. ;-)

  15. Akamai by sql*kitten · · Score: 2, Informative

    I was wondering if anyone has ever though about using their DNS servers to provide mirror information? A specially formated TXT-record could easily provide a DNS-cache-friendly mirror listing.

    Akamai already do something like this, and they didn't need to extend the DNS protocol in any way. They even provide the mirrors for you, if you use their service, and take care of ensuring that users get redirected to the nearest mirror. Sure beats having to scroll through a long list like you have to on sites that mirror the old-fashioned way, particularly since a site physically close to you might actually have less bandwidth than a faraway one.

  16. This way lies madness by eschasi · · Score: 2
    If we need a mirroring protocol, let's write one and make it a usable part of ftp/http/whatever. Inserting TXT records would be cumbersome, error-prone, and ultimately a massive mess.

    Drop a note to the IETF, get yourself a proposed RFC number, and go for it.

    1. Re:This way lies madness by Anonymous Coward · · Score: 0

      If you could apply a very simple routing system you could make it efficent.

    2. Re:This way lies madness by Anonymous Coward · · Score: 0

      And DNS was born, and the wheel was reinvented, and ...

  17. Re:Finding and choosing the best anopractor by Anonymous Coward · · Score: 0

    where are the damn moderators??

    stfu and change your threshold you cry babie.

  18. xml or text format? by Midnight+Thunder · · Score: 2, Insightful
    Since most mirror sites are usually discovered by going through the original site, then maybe if sites were to host a text or xml file at the root of the server listing the mirrors. This file would be in a universal format and could be automatically checked by browsers aware of this service. This would have the added advantage of being cachable by any proxy service.

    The sort of information the file would contain would include (5 second analysis):
    • name of sites being mirrored
    • list of the mirror, which would URL, geographic location, country name

    If the browser sees that the current server's address is not the same as the listed orginal then it knows than it is a mirror. Also, the mirror file would have the ability to list all the sites that are mirrored on the server.

    This file could then be be read by a search Engine and then when it shows the site in the search results it could list the associated mirrors. The file would probably be called mirrors.txt or mirrors.xml, depending on the format used.

    This is my 5c worth. If you like the idea, then consider it free for the taking :)
    --
    Jumpstart the tartan drive.
  19. Re:Go for it! (but don't use TXT) by Vengeful+weenie · · Score: 1

    I agree with this statement totally. You don't want to use an unstructured field, but the idea that this is bad beacuase it's an application domain is not valid. Email has used DNS for routing for a long time, and that is most certainly an application level protocol.

    The larger problem is how to model the information. DNS already supports the concept of storing geo-positional information. The problem is that the raw location isn't indicitive of the best mirror. The network topology needs to be understood and properly recorded, never mind the security implications.