md_doc_naming.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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.13"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC Core: gRPC Name Resolution</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">GRPC Core
  25. &#160;<span id="projectnumber">6.0.0</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.13 -->
  34. <script type="text/javascript">
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. </script>
  37. <script type="text/javascript" src="menudata.js"></script>
  38. <script type="text/javascript" src="menu.js"></script>
  39. <script type="text/javascript">
  40. $(function() {
  41. initMenu('',true,false,'search.php','Search');
  42. $(document).ready(function() { init_search(); });
  43. });
  44. </script>
  45. <div id="main-nav"></div>
  46. <!-- window showing the filter options -->
  47. <div id="MSearchSelectWindow"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. onkeydown="return searchBox.OnSearchSelectKey(event)">
  51. </div>
  52. <!-- iframe showing the search results (closed by default) -->
  53. <div id="MSearchResultsWindow">
  54. <iframe src="javascript:void(0)" frameborder="0"
  55. name="MSearchResults" id="MSearchResults">
  56. </iframe>
  57. </div>
  58. </div><!-- top -->
  59. <div class="header">
  60. <div class="headertitle">
  61. <div class="title">gRPC Name Resolution </div> </div>
  62. </div><!--header-->
  63. <div class="contents">
  64. <div class="textblock"><h2>Overview</h2>
  65. <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>
  66. <h2>Detailed Design</h2>
  67. <h3>Name Syntax</h3>
  68. <p>A fully qualified, self contained name used for gRPC channel construction uses the syntax:</p>
  69. <div class="fragment"><div class="line">scheme://authority/endpoint_name</div></div><!-- fragment --><p>Here, <code>scheme</code> indicates the name-system to be used. Currently, we support the following schemes:</p>
  70. <ul>
  71. <li><code>dns</code></li>
  72. <li><code>ipv4</code> (IPv4 address)</li>
  73. <li><code>ipv6</code> (IPv6 address)</li>
  74. <li><code>unix</code> (path to unix domain socket &ndash; unix systems only)</li>
  75. </ul>
  76. <p>In the future, additional schemes such as <code>etcd</code> could be added.</p>
  77. <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>
  78. <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>
  79. <h3>Resolver Plugins</h3>
  80. <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>
  81. <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>
  82. <ul>
  83. <li>A list of resolved addresses, each of which has three attributes:<ul>
  84. <li>The address itself, including both IP address and port.</li>
  85. <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>
  86. <li>The name of the balancer, if the address is a balancer address. This will be used to perform peer authorization.</li>
  87. </ul>
  88. </li>
  89. <li>A <a class="el" href="service__config_8md.html">service config</a>.</li>
  90. </ul>
  91. <p>The plugin API allows the resolvers to continuously watch an endpoint and return updated resolutions as needed. </p>
  92. </div></div><!-- contents -->
  93. <!-- start footer part -->
  94. <hr class="footer"/><address class="footer"><small>
  95. Generated on Fri Apr 13 2018 15:03:52 for GRPC Core by &#160;<a href="http://www.doxygen.org/index.html">
  96. <img class="footer" src="doxygen.png" alt="doxygen"/>
  97. </a> 1.8.13
  98. </small></address>
  99. </body>
  100. </html>