md_doc_naming.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.6"/>
  7. <title>GRPC Core: gRPC Name Resolution</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/search.js"></script>
  13. <script type="text/javascript">
  14. $(document).ready(function() { searchBox.OnSelectItem(0); });
  15. </script>
  16. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  17. </head>
  18. <body>
  19. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  20. <div id="titlearea">
  21. <table cellspacing="0" cellpadding="0">
  22. <tbody>
  23. <tr style="height: 56px;">
  24. <td style="padding-left: 0.5em;">
  25. <div id="projectname">GRPC Core
  26. &#160;<span id="projectnumber">4.0.0</span>
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.6 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  42. <li><a href="modules.html"><span>Modules</span></a></li>
  43. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  44. <li><a href="files.html"><span>Files</span></a></li>
  45. <li>
  46. <div id="MSearchBox" class="MSearchBoxInactive">
  47. <span class="left">
  48. <img id="MSearchSelect" src="search/mag_sel.png"
  49. onmouseover="return searchBox.OnSearchSelectShow()"
  50. onmouseout="return searchBox.OnSearchSelectHide()"
  51. alt=""/>
  52. <input type="text" id="MSearchField" value="Search" accesskey="S"
  53. onfocus="searchBox.OnSearchFieldFocus(true)"
  54. onblur="searchBox.OnSearchFieldFocus(false)"
  55. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  56. </span><span class="right">
  57. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  58. </span>
  59. </div>
  60. </li>
  61. </ul>
  62. </div>
  63. <!-- window showing the filter options -->
  64. <div id="MSearchSelectWindow"
  65. onmouseover="return searchBox.OnSearchSelectShow()"
  66. onmouseout="return searchBox.OnSearchSelectHide()"
  67. onkeydown="return searchBox.OnSearchSelectKey(event)">
  68. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  69. <!-- iframe showing the search results (closed by default) -->
  70. <div id="MSearchResultsWindow">
  71. <iframe src="javascript:void(0)" frameborder="0"
  72. name="MSearchResults" id="MSearchResults">
  73. </iframe>
  74. </div>
  75. </div><!-- top -->
  76. <div class="header">
  77. <div class="headertitle">
  78. <div class="title">gRPC Name Resolution </div> </div>
  79. </div><!--header-->
  80. <div class="contents">
  81. <div class="textblock"><h2>Overview</h2>
  82. <p>gRPC supports DNS as the default name-system. A number of alternative name-systems are used in various deployments. We support an API that is general enough to support a range of name-systems and the corresponding syntax for names. The gRPC client library in various languages will provide a plugin mechanism so resolvers for different name-systems can be plugged in.</p>
  83. <h2>Detailed Design</h2>
  84. <h3>Name Syntax</h3>
  85. <p>A fully qualified, self contained name used for gRPC channel construction uses the syntax:</p>
  86. <p>``` scheme://authority/endpoint_name ```</p>
  87. <p>Here, <code>scheme</code> indicates the name-system to be used. Currently, we support the following schemes:</p>
  88. <ul>
  89. <li><code>dns</code></li>
  90. <li><code>ipv4</code> (IPv4 address)</li>
  91. <li><code>ipv6</code> (IPv6 address)</li>
  92. <li><code>unix</code> (path to unix domain socket &ndash; unix systems only)</li>
  93. </ul>
  94. <p>In the future, additional schemes such as <code>etcd</code> could be added.</p>
  95. <p>The <code>authority</code> indicates some scheme-specific bootstrap information, e.g., for DNS, the authority may include the IP[:port] of the DNS server to use. Often, a DNS name may be used as the authority, since the ability to resolve DNS names is already built into all gRPC client libraries.</p>
  96. <p>Finally, the <code>endpoint_name</code> indicates a concrete name to be looked up in a given name-system identified by the scheme and the authority. The syntax of the endpoint name is dictated by the scheme in use.</p>
  97. <h3>Resolver Plugins</h3>
  98. <p>The gRPC client library will use the specified scheme to pick the right resolver plugin and pass it the fully qualified name string.</p>
  99. <p>Resolvers should be able to contact the authority and get a resolution that they return back to the gRPC client library. The returned contents include:</p>
  100. <ul>
  101. <li>A list of resolved addresses, each of which has three attributes:<ul>
  102. <li>The address itself, including both IP address and port.</li>
  103. <li>A boolean indicating whether the address is a backend address (i.e., the address to use to contact the server directly) or a balancer address (for cases where <a class="el" href="load-balancing_8md.html">external load balancing</a> is in use).</li>
  104. <li>The name of the balancer, if the address is a balancer address. This will be used to perform peer authorization.</li>
  105. </ul>
  106. </li>
  107. <li>A <a class="el" href="service__config_8md.html">service config</a>.</li>
  108. </ul>
  109. <p>The plugin API allows the resolvers to continuously watch an endpoint and return updated resolutions as needed. </p>
  110. </div></div><!-- contents -->
  111. <!-- start footer part -->
  112. <hr class="footer"/><address class="footer"><small>
  113. Generated on Wed Jun 21 2017 14:13:07 for GRPC Core by &#160;<a href="http://www.doxygen.org/index.html">
  114. <img class="footer" src="doxygen.png" alt="doxygen"/>
  115. </a> 1.8.6
  116. </small></address>
  117. </body>
  118. </html>