<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="no"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="no"?>
<?rfc inline="yes"?>
<?rfc subcompact="no"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes"?>
<?rfc compact="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc colonspace='yes' ?>
<!-- 
TODO

Consider if this should be PS

Consider if request to IANA should be for permanent registration

 -->
<rfc category="info" docName="draft-jennings-http-srv-05"
     ipr="pre5378Trust200902">
  <front>
    <title abbrev="HTTP SRV">DNS SRV Records for HTTP</title>

    <author fullname="Cullen Jennings" initials="C." surname="Jennings">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>170 West Tasman Drive</street>

          <street>Mailstop SJC-30</street>

          <city>San Jose</city>

          <region>CA</region>

          <code>95134</code>

          <country>USA</country>
        </postal>

        <phone>+1 408 902-3341</phone>

        <email>fluffy@cisco.com</email>
      </address>
    </author>

    <date day="7" month="March" year="2009" />

    <abstract>
      <t>This document specifies a new URI scheme called http+srv which uses a
      DNS SRV lookup to locate a HTTP server. The http+srv scheme operates in
      the same way as an http scheme but instead of the normal DNS lookup that
      a http scheme would use, it first tries an DNS SRV lookup. This memo
      also defines a https+srv scheme that operates in the same was as an
      https URI but uses DNS SRV lookups.</t>

      <t>The draft is being discussed on the apps-discuss@ietf.org list.</t>
    </abstract>

    <note title="Legal">
      <t>This documents and the information contained therein are provided on
      an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
      OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
      THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
      IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
      INFORMATION THEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
      WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Web services often define APIs where software running on machine in a
      data center acts as an HTTP client and performs some http transactions
      to another HTTP server. For example, a portal such as Facebook can act
      as a http client and call specific HTTP-based APIs on other http
      servers. The reality of current networks is a large portion of the hosts
      have NATed addresses and often can not run on port 80. This is likely to
      become more common with the deployment of Carrier Grade NAT. DNS SRV
      records allow a DNS lookup of a name like www.example.com to provide
      both a port and the IP addresses of the HTTP server.</t>

      <t>This specification defines two new URI schemes, http+srv, and
      https+srv which are like http and https respectively. When a http client
      uses one of theses schemes to locate a web server, it starts by doing a
      DNS SRV record lookup and if one is found, uses that result. If no SRV
      record is found, it falls back to a DNS address (A or AAAA) record. The
      specification does not update or modify HTTP in any way.</t>

      <t>It is not expected that most web browsers would support these schemes
      for generic web use. It would instead be used for particular
      applications using HTTP such as specific web APIs. These APIs would be
      defined to require the use of this specification. In this situation, the
      end user's web browser might not do the SRV lookup when it browsed to
      the portal web pages, but the HTTP calls that the portal made out to
      other sites to generate the content would use this mechanism. As such
      architectures become more common, DNS SRV would allow many servers that
      are just providing an API to run on ports other than 80 even though main
      portal sites may still be running on the well known ports. Eventually,
      web browsers may end up supporting these SRV lookups, as the
      implementation is trivial and has very little downside.</t>

      <t>This technique is useful where users wish to run a web server behind
      a NAT but cannot control which port the NAT will allocate for the
      service. It is also useful where several users want to run different web
      servers on the same machine. A third use case for HTTP SRV is a
      situation in which all requests should be sent to a primary server, but
      if that server is down, then requests should fall back to an alternative
      server.</t>
    </section>

    <section title="Open Issues">
      <t>The big open issue seems to be if one should just update the HTTP
      scheme to do this SRV lookup and not create a new scheme. The 00 version
      of this draft did that. A new scheme makes this somewhat unusable for
      general web surfing while using the old scheme results in a very long
      transition times where different clients resolve URLs in different
      ways.</t>
    </section>

    <section title="Terminology">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </section>

    <section title="Mechanisms">
      <t>Applications compliant with this specification MUST perform an SRV
      lookup as specified in <xref target="RFC2782"></xref> when resolving the
      host portion of a http+srv or https+srv URI. As defined in the IANA port
      numbers registry, the service names used are _http and _https
      respectively. As described in RFC 2782, if no SRV record is present, the
      resolution will fall back on using other DNS records that would be used
      by a http scheme as defined in HTTP<xref target="RFC2616"></xref>. The
      rest of the http+srv URI is processed in the same way as an http URI in
      RFC 2616 while the rest of a https+srv scheme URI is processed the same
      way as a https URI as defined in <xref target="RFC2818"></xref>.</t>
    </section>

    <section title="Example">
      <t>In the following example, the client will do a lookup on the URI,
      which finds the SRV record that then points at the A record that points
      at the IP address.</t>

      <figure anchor="fig-arch64">
        <artwork><![CDATA[
URI: https+srv://example.com
DNS SRV RR: _https._tcp.example.com. SRV 1 0 8080 host1.example.com.
DNS A RR:   host1.example.com.       A   192.0.2.88
]]></artwork>
      </figure>

      <t>In this case the client would form a TCP connection to
      192.0.2.88:8080 then start TLS over that connection. Note that the
      certificate in the TLS handshake would be matched to example.com as that
      was the names used in the URI and it would not be matched to
      host1.example.com.</t>
    </section>

    <section title="IANA Considerations">
      <t>This specification registers two provisional URI schemes.</t>

      <section title="http+srv URI scheme">
        <t><list style="hanging">
            <t hangText="URI scheme name:"></t>

            <t>http+srv</t>

            <t hangText="Status:"></t>

            <t>provisional</t>

            <t hangText="URI scheme syntax:"></t>

            <t>Identical to http URI as defined in RFC 2616 but using the
            'http+srv' protocol identifier in place of the 'http' protocol
            identifier</t>

            <t hangText="URI scheme semantics:"></t>

            <t>See draft-jennings-http-srv</t>

            <t hangText="Encoding considerations:"></t>

            <t>No special considerations</t>

            <t
            hangText="Applications/protocols that use this URI scheme name:"></t>

            <t>Applications which need to lookup http servers using DNS
            SRV</t>

            <t hangText="Interoperability considerations.:"></t>

            <t>None known</t>

            <t hangText="Security considerations.:"></t>

            <t>Same as http URI. See RFC 2616</t>

            <t hangText="Contact.:"></t>

            <t>Cullen Jennings &lt;fluffy@cisco.com&gt;</t>

            <t hangText="Author/Change controller.:"></t>

            <t>Cullen Jennings &lt;fluffy@cisco.com&gt;</t>

            <t hangText=" References.:"></t>

            <t>draft-jennings-http-srv</t>

            <t>RFC 3986</t>

            <t>RFC 2616</t>
          </list></t>
      </section>

      <section title="https+srv URI scheme">
        <t><list style="hanging">
            <t hangText="URI scheme name:"></t>

            <t>https+srv</t>

            <t hangText="Status:"></t>

            <t>provisional</t>

            <t hangText="URI scheme syntax:"></t>

            <t>Identical to http URI as defined in RFC 2818 but using the
            'https+srv' protocol identifier in place of the 'https' protocol
            identifier</t>

            <t hangText="URI scheme semantics:"></t>

            <t>See draft-jennings-http-srv</t>

            <t hangText="Encoding considerations:"></t>

            <t>No special considerations</t>

            <t
            hangText="Applications/protocols that use this URI scheme name:"></t>

            <t>Applications which need to lookup http servers using DNS
            SRV</t>

            <t hangText="Interoperability considerations.:"></t>

            <t>None known</t>

            <t hangText="Security considerations.:"></t>

            <t>Same as https URI. See RFC 2818</t>

            <t hangText="Contact.:"></t>

            <t>Cullen Jennings &lt;fluffy@cisco.com&gt;</t>

            <t hangText="Author/Change controller.:"></t>

            <t>Cullen Jennings &lt;fluffy@cisco.com&gt;</t>

            <t hangText=" References.:"></t>

            <t>draft-jennings-http-srv</t>

            <t>RFC 3986</t>

            <t>RFC 2818</t>
          </list></t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>This introduces no new security considerations beyond the common
      usage of HTTP. It is analogous to DNS CNAME records that redirect
      address records.</t>
    </section>

    <section anchor="acks" title="Acknowledgements">
      <t>Variants of this idea has been proposed by many people, including
      Mark Andrews and Thor Kottelin in an internet draft in 2000. A related
      draft<xref target="wood-tae-specifying-uri-transports"></xref> discusses
      selecting SCTP for HTTP.</t>

      <!--Draft is -->

      <!--8x8 did a patch to implement this https://bugzilla.mozilla.org/show_bug.cgi?id=14328-->

      <t>Some text came from various documents by Ted Hardie. Thanks to good
      feedback from many people including Ted Hardie, S. Moonesamy, Cyrus
      Daboo, Stefanos Harhalakis, Ray Bellis, John Klensin, and Eran
      Hammer-Lahav.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <reference anchor="RFC2119">
        <front>
          <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate
          Requirement Levels</title>

          <author fullname="Scott Bradner" initials="S." surname="Bradner">
            <organization>Harvard University</organization>

            <address>
              <postal>
                <street>1350 Mass. Ave.</street>

                <street>Cambridge</street>

                <street>MA 02138</street>
              </postal>

              <phone>- +1 617 495 3864</phone>

              <email>sob@harvard.edu</email>
            </address>
          </author>

          <date month="March" year="1997" />

          <area>General</area>

          <keyword>keyword</keyword>

          <abstract>
            <t>In many standards track documents several words are used to
            signify the requirements in the specification. These words are
            often capitalized. This document defines these words as they
            should be interpreted in IETF documents. Authors who follow these
            guidelines should incorporate this phrase near the beginning of
            their document: <list>
                <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
                "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
                "OPTIONAL" in this document are to be interpreted as described
                in RFC 2119.</t>
              </list></t>

            <t>Note that the force of these words is modified by the
            requirement level of the document in which they are used.</t>
          </abstract>
        </front>

        <seriesInfo name="BCP" value="14" />

        <seriesInfo name="RFC" value="2119" />

        <format octets="4723" target="ftp://ftp.isi.edu/in-notes/rfc2119.txt"
                type="TXT" />

        <format octets="17491"
                target="http://xml.resource.org/public/rfc/html/rfc2119.html"
                type="HTML" />

        <format octets="5777"
                target="http://xml.resource.org/public/rfc/xml/rfc2119.xml"
                type="XML" />
      </reference>

      <reference anchor="RFC2616">
        <front>
          <title abbrev="HTTP/1.1">Hypertext Transfer Protocol --
          HTTP/1.1</title>

          <author fullname="Roy T. Fielding" initials="R." surname="Fielding">
            <organization abbrev="UC Irvine">Department of Information and
            Computer Science</organization>

            <address>
              <postal>
                <street>University of California, Irvine</street>

                <city>Irvine</city>

                <region>CA</region>

                <code>92697-3425</code>
              </postal>

              <facsimile>+1(949)824-1715</facsimile>

              <email>fielding@ics.uci.edu</email>
            </address>
          </author>

          <author fullname="James Gettys" initials="J." surname="Gettys">
            <organization abbrev="Compaq/W3C">World Wide Web
            Consortium</organization>

            <address>
              <postal>
                <street>MIT Laboratory for Computer Science, NE43-356</street>

                <street>545 Technology Square</street>

                <city>Cambridge</city>

                <region>MA</region>

                <code>02139</code>
              </postal>

              <facsimile>+1(617)258-8682</facsimile>

              <email>jg@w3.org</email>
            </address>
          </author>

          <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
            <organization abbrev="Compaq">Compaq Computer
            Corporation</organization>

            <address>
              <postal>
                <street>Western Research Laboratory</street>

                <street>250 University Avenue</street>

                <city>Palo Alto</city>

                <region>CA</region>

                <code>94305</code>
              </postal>

              <email>mogul@wrl.dec.com</email>
            </address>
          </author>

          <author fullname="Henrik Frystyk Nielsen" initials="H."
                  surname="Frystyk">
            <organization abbrev="W3C/MIT">World Wide Web
            Consortium</organization>

            <address>
              <postal>
                <street>MIT Laboratory for Computer Science, NE43-356</street>

                <street>545 Technology Square</street>

                <city>Cambridge</city>

                <region>MA</region>

                <code>02139</code>
              </postal>

              <facsimile>+1(617)258-8682</facsimile>

              <email>frystyk@w3.org</email>
            </address>
          </author>

          <author fullname="Larry Masinter" initials="L." surname="Masinter">
            <organization abbrev="Xerox">Xerox Corporation</organization>

            <address>
              <postal>
                <street>MIT Laboratory for Computer Science, NE43-356</street>

                <street>3333 Coyote Hill Road</street>

                <city>Palo Alto</city>

                <region>CA</region>

                <code>94034</code>
              </postal>

              <email>masinter@parc.xerox.com</email>
            </address>
          </author>

          <author fullname="Paul J. Leach" initials="P." surname="Leach">
            <organization abbrev="Microsoft">Microsoft
            Corporation</organization>

            <address>
              <postal>
                <street>1 Microsoft Way</street>

                <city>Redmond</city>

                <region>WA</region>

                <code>98052</code>
              </postal>

              <email>paulle@microsoft.com</email>
            </address>
          </author>

          <author fullname="Tim Berners-Lee" initials="T."
                  surname="Berners-Lee">
            <organization abbrev="W3C/MIT">World Wide Web
            Consortium</organization>

            <address>
              <postal>
                <street>MIT Laboratory for Computer Science, NE43-356</street>

                <street>545 Technology Square</street>

                <city>Cambridge</city>

                <region>MA</region>

                <code>02139</code>
              </postal>

              <facsimile>+1(617)258-8682</facsimile>

              <email>timbl@w3.org</email>
            </address>
          </author>

          <date month="June" year="1999" />

          <abstract>
            <t>The Hypertext Transfer Protocol (HTTP) is an application-level
            protocol for distributed, collaborative, hypermedia information
            systems. It is a generic, stateless, protocol which can be used
            for many tasks beyond its use for hypertext, such as name servers
            and distributed object management systems, through extension of
            its request methods, error codes and headers . A feature of HTTP
            is the typing and negotiation of data representation, allowing
            systems to be built independently of the data being
            transferred.</t>

            <t>HTTP has been in use by the World-Wide Web global information
            initiative since 1990. This specification defines the protocol
            referred to as "HTTP/1.1", and is an update to RFC 2068 .</t>
          </abstract>
        </front>

        <seriesInfo name="RFC" value="2616" />

        <format octets="422317"
                target="ftp://ftp.isi.edu/in-notes/rfc2616.txt" type="TXT" />

        <format octets="5529857"
                target="ftp://ftp.isi.edu/in-notes/rfc2616.ps" type="PS" />

        <format octets="550558"
                target="ftp://ftp.isi.edu/in-notes/rfc2616.pdf" type="PDF" />

        <format octets="636125"
                target="http://xml.resource.org/public/rfc/html/rfc2616.html"
                type="HTML" />

        <format octets="493420"
                target="http://xml.resource.org/public/rfc/xml/rfc2616.xml"
                type="XML" />
      </reference>

      <reference anchor="RFC2818">
        <front>
          <title>HTTP Over TLS</title>

          <author fullname="E. Rescorla" initials="E." surname="Rescorla">
            <organization></organization>
          </author>

          <date month="May" year="2000" />

          <abstract>
            <t>This memo describes how to use Transport Layer Security (TLS)
            to secure Hypertext Transfer Protocol (HTTP) connections over the
            Internet. This memo provides information for the Internet
            community.</t>
          </abstract>
        </front>

        <seriesInfo name="RFC" value="2818" />

        <format octets="15170" target="ftp://ftp.isi.edu/in-notes/rfc2818.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC2782">
        <front>
          <title abbrev="DNS SRV RR">A DNS RR for specifying the location of
          services (DNS SRV)</title>

          <author fullname="Arnt Gulbrandsen" initials="A."
                  surname="Gulbrandsen">
            <organization>Troll Tech</organization>

            <address>
              <postal>
                <street>Waldemar Thranes gate 98B</street>

                <city>Oslo</city>

                <region></region>

                <code>N-0175</code>

                <country>NO</country>
              </postal>

              <phone>+47 22 806390</phone>

              <facsimile>+47 22 806380</facsimile>

              <email>arnt@troll.no</email>
            </address>
          </author>

          <author fullname="Paul Vixie" initials="P." surname="Vixie">
            <organization>Internet Software Consortium</organization>

            <address>
              <postal>
                <street>950 Charter Street</street>

                <city>Redwood City</city>

                <region>CA</region>

                <code>94063</code>

                <country>US</country>
              </postal>

              <phone>+1 650 779 7001</phone>
            </address>
          </author>

          <author fullname="Levon Esibov" initials="L." surname="Esibov">
            <organization>Microsoft Corporation</organization>

            <address>
              <postal>
                <street>One Microsoft Way</street>

                <city>Redmond</city>

                <region>WA</region>

                <code>98052</code>

                <country>US</country>
              </postal>

              <email>levone@microsoft.com</email>
            </address>
          </author>

          <date month="February" year="2000" />

          <abstract>
            <t>This document describes a DNS RR which specifies the location
            of the server(s) for a specific protocol and domain.</t>
          </abstract>
        </front>

        <seriesInfo name="RFC" value="2782" />

        <format octets="24013" target="ftp://ftp.isi.edu/in-notes/rfc2782.txt"
                type="TXT" />
      </reference>
    </references>

    <references title="Informative References">
      <reference anchor="wood-tae-specifying-uri-transports">
        <front>
          <title>Specifying transport mechanisms for retrieval or delivery of
          URIs</title>

          <author fullname="Lloyd  Wood" initials="L" surname="Wood">
            <organization></organization>
          </author>

          <date day="19" month="December" year="2008" />

          <abstract>
            <t>This document describes a simple extension of the URI format to
            allow preferred transport mechanisms and interfaces to be
            specified. This explicit configuration is beneficial for
            separation of HTTP from underlying transports, which has been
            increasingly recognised as useful. Explicit configuration in the
            URI for programs is valuable when TCP, traditionally used to carry
            HTTP, is not present or not desired, or when other methods of
            determining or negotiating the appropriate transport method to
            use, e.g. the Domain Name System (DNS), are absent.</t>
          </abstract>
        </front>

        <seriesInfo name="Internet-Draft"
                    value="draft-wood-tae-specifying-uri-transports-01" />

        <format target="http://www.ietf.org/internet-drafts/draft-wood-tae-specifying-uri-transports-01.txt"
                type="TXT" />
      </reference>
    </references>
  </back>
</rfc>