blob: 46d0a56c4cc5ae424f282be8ae61b3877bf202cf [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>12 推荐用法 · GitBook</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.2">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="capacity-plan.html" />
<link rel="prev" href="best-practice.html" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./">
Introduction
</a>
</li>
<li class="chapter " data-level="1.2" >
<span>
1 入门
</span>
<ul class="articles">
<li class="chapter " data-level="1.2.1" data-path="preface/background.html">
<a href="preface/background.html">
1.1 背景
</a>
</li>
<li class="chapter " data-level="1.2.2" data-path="preface/requirements.html">
<a href="preface/requirements.html">
1.2 需求
</a>
</li>
<li class="chapter " data-level="1.2.3" data-path="preface/architacture.html">
<a href="preface/architacture.html">
1.3 架构
</a>
</li>
<li class="chapter " data-level="1.2.4" data-path="preface/usage.html">
<a href="preface/usage.html">
1.4 用法
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.3" >
<span>
2 快速启动
</span>
<ul class="articles">
<li class="chapter " data-level="1.3.1" data-path="dependencies/dependencies.html">
<a href="dependencies/dependencies.html">
2.1 依赖
</a>
</li>
<li class="chapter " data-level="1.3.2" data-path="maturity/maturity.html">
<a href="maturity/maturity.html">
2.2 成熟度
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.4" >
<span>
3 配置
</span>
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="configuration/xml.html">
<a href="configuration/xml.html">
3.1 XML配置
</a>
</li>
<li class="chapter " data-level="1.4.2" data-path="configuration/properties.html">
<a href="configuration/properties.html">
3.2 属性配置
</a>
</li>
<li class="chapter " data-level="1.4.3" data-path="configuration/api.html">
<a href="configuration/api.html">
3.3 API配置
</a>
</li>
<li class="chapter " data-level="1.4.4" data-path="configuration/annotation.html">
<a href="configuration/annotation.html">
3.4 注解配置
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5" >
<span>
4 示例
</span>
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="demos/启动时检查.html">
<a href="demos/启动时检查.html">
4.1 启动时检查
</a>
</li>
<li class="chapter " data-level="1.5.2" data-path="demos/集群容错.html">
<a href="demos/集群容错.html">
4.2 集群容错
</a>
</li>
<li class="chapter " data-level="1.5.3" data-path="demos/负载均衡.html">
<a href="demos/负载均衡.html">
4.3 负载均衡
</a>
</li>
<li class="chapter " data-level="1.5.4" data-path="demos/线程模型.html">
<a href="demos/线程模型.html">
4.4 线程模型
</a>
</li>
<li class="chapter " data-level="1.5.5" data-path="demos/直连提供者.html">
<a href="demos/直连提供者.html">
4.5 直连提供者
</a>
</li>
<li class="chapter " data-level="1.5.6" data-path="demos/只订阅.html">
<a href="demos/只订阅.html">
4.6 只订阅
</a>
</li>
<li class="chapter " data-level="1.5.7" data-path="demos/只注册.html">
<a href="demos/只注册.html">
4.7 只注册
</a>
</li>
<li class="chapter " data-level="1.5.8" data-path="demos/静态服务.html">
<a href="demos/静态服务.html">
4.8 静态服务
</a>
</li>
<li class="chapter " data-level="1.5.9" data-path="demos/多协议.html">
<a href="demos/多协议.html">
4.9 多协议
</a>
</li>
<li class="chapter " data-level="1.5.10" data-path="demos/多注册中心.html">
<a href="demos/多注册中心.html">
4.10 多注册中心
</a>
</li>
<li class="chapter " data-level="1.5.11" data-path="demos/服务分组.html">
<a href="demos/服务分组.html">
4.11 服务分组
</a>
</li>
<li class="chapter " data-level="1.5.12" data-path="demos/多版本.html">
<a href="demos/多版本.html">
4.13 多版本
</a>
</li>
<li class="chapter " data-level="1.5.13" data-path="demos/分组聚合.html">
<a href="demos/分组聚合.html">
4.14 分组聚合
</a>
</li>
<li class="chapter " data-level="1.5.14" data-path="demos/参数验证.html">
<a href="demos/参数验证.html">
4.15 参数验证
</a>
</li>
<li class="chapter " data-level="1.5.15" data-path="demos/结果缓存.html">
<a href="demos/结果缓存.html">
4.16 结果缓存
</a>
</li>
<li class="chapter " data-level="1.5.16" data-path="demos/泛化引用.html">
<a href="demos/泛化引用.html">
4.17 泛化引用
</a>
</li>
<li class="chapter " data-level="1.5.17" data-path="demos/泛化实现.html">
<a href="demos/泛化实现.html">
4.18 泛化实现
</a>
</li>
<li class="chapter " data-level="1.5.18" data-path="demos/回声测试.html">
<a href="demos/回声测试.html">
4.19 回声测试
</a>
</li>
<li class="chapter " data-level="1.5.19" data-path="demos/上下文信息.html">
<a href="demos/上下文信息.html">
4.20 上下文信息
</a>
</li>
<li class="chapter " data-level="1.5.20" data-path="demos/隐式传参.html">
<a href="demos/隐式传参.html">
4.21 隐式参数
</a>
</li>
<li class="chapter " data-level="1.5.21" data-path="demos/异步调用.html">
<a href="demos/异步调用.html">
4.22 异步调用
</a>
</li>
<li class="chapter " data-level="1.5.22" data-path="demos/本地调用.html">
<a href="demos/本地调用.html">
4.23 本地调用
</a>
</li>
<li class="chapter " data-level="1.5.23" data-path="demos/参数回调.html">
<a href="demos/参数回调.html">
4.24 参数回调
</a>
</li>
<li class="chapter " data-level="1.5.24" data-path="demos/事件通知.html">
<a href="demos/事件通知.html">
4.25 事件通知
</a>
</li>
<li class="chapter " data-level="1.5.25" data-path="demos/本地存根.html">
<a href="demos/本地存根.html">
4.26 本地存根
</a>
</li>
<li class="chapter " data-level="1.5.26" data-path="demos/本地伪装.html">
<a href="demos/本地伪装.html">
4.27 本地伪装
</a>
</li>
<li class="chapter " data-level="1.5.27" data-path="demos/延迟暴露.html">
<a href="demos/延迟暴露.html">
4.28 延迟暴露
</a>
</li>
<li class="chapter " data-level="1.5.28" data-path="demos/并发控制.html">
<a href="demos/并发控制.html">
4.29 并发控制
</a>
</li>
<li class="chapter " data-level="1.5.29" data-path="demos/连接控制.html">
<a href="demos/连接控制.html">
4.30 连接控制
</a>
</li>
<li class="chapter " data-level="1.5.30" data-path="demos/延迟连接.html">
<a href="demos/延迟连接.html">
4.31 延迟连接
</a>
</li>
<li class="chapter " data-level="1.5.31" data-path="demos/粘滞连接.html">
<a href="demos/粘滞连接.html">
4.32 粘滞连接
</a>
</li>
<li class="chapter " data-level="1.5.32" data-path="demos/令牌验证.html">
<a href="demos/令牌验证.html">
4.33 令牌验证
</a>
</li>
<li class="chapter " data-level="1.5.33" data-path="demos/路由规则.html">
<a href="demos/路由规则.html">
4.34 路由规则
</a>
</li>
<li class="chapter " data-level="1.5.34" data-path="demos/配置规则.html">
<a href="demos/配置规则.html">
4.35 配置规则
</a>
</li>
<li class="chapter " data-level="1.5.35" data-path="demos/服务降级.html">
<a href="demos/服务降级.html">
4.36 服务降级
</a>
</li>
<li class="chapter " data-level="1.5.36" data-path="demos/优雅停机.html">
<a href="demos/优雅停机.html">
4.37 优雅停机
</a>
</li>
<li class="chapter " data-level="1.5.37" data-path="demos/主机绑定.html">
<a href="demos/主机绑定.html">
4.38 主机绑定
</a>
</li>
<li class="chapter " data-level="1.5.38" data-path="demos/日志适配.html">
<a href="demos/日志适配.html">
4.39 日志适配
</a>
</li>
<li class="chapter " data-level="1.5.39" data-path="demos/访问日志.html">
<a href="demos/访问日志.html">
4.40 访问日志
</a>
</li>
<li class="chapter " data-level="1.5.40" data-path="demos/服务容器.html">
<a href="demos/服务容器.html">
4.41 服务容器
</a>
</li>
<li class="chapter " data-level="1.5.41" data-path="demos/ReferenceConfig缓存.html">
<a href="demos/ReferenceConfig缓存.html">
4.42 Reference Config缓存
</a>
</li>
<li class="chapter " data-level="1.5.42" data-path="demos/分布式事务.html">
<a href="demos/分布式事务.html">
4.43 分布式事务
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.6" data-path="reference-apiconf/api.html">
<a href="reference-apiconf/api.html">
5 API参考手册
</a>
</li>
<li class="chapter " data-level="1.7" data-path="reference-xmlconf/introduction.html">
<a href="reference-xmlconf/introduction.html">
6 schema配置参考手册
</a>
<ul class="articles">
<li class="chapter " data-level="1.7.1" data-path="reference-xmlconf/dubbo-service.html">
<a href="reference-xmlconf/dubbo-service.html">
6.1 dubbo:service
</a>
</li>
<li class="chapter " data-level="1.7.2" data-path="reference-xmlconf/dubbo-reference.html">
<a href="reference-xmlconf/dubbo-reference.html">
6.2 dubbo:reference
</a>
</li>
<li class="chapter " data-level="1.7.3" data-path="reference-xmlconf/dubbo-protocol.html">
<a href="reference-xmlconf/dubbo-protocol.html">
6.3 dubbo:protocol
</a>
</li>
<li class="chapter " data-level="1.7.4" data-path="reference-xmlconf/dubbo-registry.html">
<a href="reference-xmlconf/dubbo-registry.html">
6.4 dubbo:registry
</a>
</li>
<li class="chapter " data-level="1.7.5" data-path="reference-xmlconf/dubbo-monitor.html">
<a href="reference-xmlconf/dubbo-monitor.html">
6.5 dubbo:monitor
</a>
</li>
<li class="chapter " data-level="1.7.6" data-path="reference-xmlconf/dubbo-application.html">
<a href="reference-xmlconf/dubbo-application.html">
6.6 dubbo:application
</a>
</li>
<li class="chapter " data-level="1.7.7" data-path="reference-xmlconf/dubbo-module.html">
<a href="reference-xmlconf/dubbo-module.html">
6.7 dubbo:module
</a>
</li>
<li class="chapter " data-level="1.7.8" data-path="reference-xmlconf/dubbo-provider.html">
<a href="reference-xmlconf/dubbo-provider.html">
6.8 dubbo:provider
</a>
</li>
<li class="chapter " data-level="1.7.9" data-path="reference-xmlconf/dubbo-consumer.html">
<a href="reference-xmlconf/dubbo-consumer.html">
6.9 dubbo:consumer
</a>
</li>
<li class="chapter " data-level="1.7.10" data-path="reference-xmlconf/dubbo-method.html">
<a href="reference-xmlconf/dubbo-method.html">
6.10 dubbo:method
</a>
</li>
<li class="chapter " data-level="1.7.11" data-path="reference-xmlconf/dubbo-argument.html">
<a href="reference-xmlconf/dubbo-argument.html">
6.11 dubbo:argument
</a>
</li>
<li class="chapter " data-level="1.7.12" data-path="reference-xmlconf/dubbo-parameter.html">
<a href="reference-xmlconf/dubbo-parameter.html">
6.12 dubbo:parameter
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.8" data-path="reference-protocol/introduction.html">
<a href="reference-protocol/introduction.html">
7 协议参考手册
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="reference-protocol/dubbo.html">
<a href="reference-protocol/dubbo.html">
7.1 dubbo://
</a>
</li>
<li class="chapter " data-level="1.8.2" data-path="reference-protocol/rmi.html">
<a href="reference-protocol/rmi.html">
7.2 rmi//
</a>
</li>
<li class="chapter " data-level="1.8.3" data-path="reference-protocol/hessian.html">
<a href="reference-protocol/hessian.html">
7.3 hessian://
</a>
</li>
<li class="chapter " data-level="1.8.4" data-path="reference-protocol/http.html">
<a href="reference-protocol/http.html">
7.4 http://
</a>
</li>
<li class="chapter " data-level="1.8.5" data-path="reference-protocol/webservice.html">
<a href="reference-protocol/webservice.html">
7.5 webservice://
</a>
</li>
<li class="chapter " data-level="1.8.6" data-path="reference-protocol/thrift.html">
<a href="reference-protocol/thrift.html">
7.6 thrift://
</a>
</li>
<li class="chapter " data-level="1.8.7" data-path="reference-protocol/memcached.html">
<a href="reference-protocol/memcached.html">
7.7 memcached://
</a>
</li>
<li class="chapter " data-level="1.8.8" data-path="reference-protocol/redis.html">
<a href="reference-protocol/redis.html">
7.8 redis://
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="reference-registry/introduction.html">
<a href="reference-registry/introduction.html">
8 注册中心参考手册
</a>
<ul class="articles">
<li class="chapter " data-level="1.9.1" data-path="reference-registry/multicast.html">
<a href="reference-registry/multicast.html">
8.1 Multicast注册中心
</a>
</li>
<li class="chapter " data-level="1.9.2" data-path="reference-registry/zookeeper.html">
<a href="reference-registry/zookeeper.html">
8.2 Zookeeper注册中心
</a>
</li>
<li class="chapter " data-level="1.9.3" data-path="reference-registry/redis.html">
<a href="reference-registry/redis.html">
8.3 Redis注册中心
</a>
</li>
<li class="chapter " data-level="1.9.4" data-path="reference-registry/simple.html">
<a href="reference-registry/simple.html">
8.4 Simple注册中心
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.10" data-path="reference-telnet/telnet.html">
<a href="reference-telnet/telnet.html">
9 telnet命令参考手册
</a>
</li>
<li class="chapter " data-level="1.11" data-path="reference-maven/maven.html">
<a href="reference-maven/maven.html">
10 maven插件参考手册
</a>
</li>
<li class="chapter " data-level="1.12" data-path="best-practice.html">
<a href="best-practice.html">
11 服务化最佳实践
</a>
</li>
<li class="chapter active" data-level="1.13" data-path="recommend.html">
<a href="recommend.html">
12 推荐用法
</a>
</li>
<li class="chapter " data-level="1.14" data-path="capacity-plan.html">
<a href="capacity-plan.html">
13 容量规划
</a>
</li>
<li class="chapter " data-level="1.15" data-path="benchmark.html">
<a href="benchmark.html">
14 基准测试工具包
</a>
</li>
<li class="chapter " data-level="1.16" data-path="perf-test.html">
<a href="perf-test.html">
15 性能测试报告
</a>
</li>
<li class="chapter " data-level="1.17" data-path="coveragence.html">
<a href="coveragence.html">
16 测试覆盖率报告
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >12 推荐用法</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h4 id="&#x5728;provider&#x4E0A;&#x5C3D;&#x91CF;&#x591A;&#x914D;&#x7F6E;consumer&#x7AEF;&#x5C5E;&#x6027;">&#x5728;Provider&#x4E0A;&#x5C3D;&#x91CF;&#x591A;&#x914D;&#x7F6E;Consumer&#x7AEF;&#x5C5E;&#x6027;</h4>
<p>&#x539F;&#x56E0;&#x5982;&#x4E0B;&#xFF1A;</p>
<ul>
<li>&#x4F5C;&#x670D;&#x52A1;&#x7684;&#x63D0;&#x4F9B;&#x8005;&#xFF0C;&#x6BD4;&#x670D;&#x52A1;&#x4F7F;&#x7528;&#x65B9;&#x66F4;&#x6E05;&#x695A;&#x670D;&#x52A1;&#x6027;&#x80FD;&#x53C2;&#x6570;&#xFF0C;&#x5982;&#x8C03;&#x7528;&#x7684;&#x8D85;&#x65F6;&#x65F6;&#x95F4;&#xFF0C;&#x5408;&#x7406;&#x7684;&#x91CD;&#x8BD5;&#x6B21;&#x6570;&#xFF0C;&#x7B49;&#x7B49;</li>
<li>&#x5728;Provider&#x914D;&#x7F6E;&#x540E;&#xFF0C;Consumer&#x4E0D;&#x914D;&#x7F6E;&#x5219;&#x4F1A;&#x4F7F;&#x7528;Provider&#x7684;&#x914D;&#x7F6E;&#x503C;&#xFF0C;&#x5373;Provider&#x914D;&#x7F6E;&#x53EF;&#x4EE5;&#x4F5C;&#x4E3A;Consumer&#x7684;&#x7F3A;&#x7701;&#x503C;&#x3002;&#x5426;&#x5219;&#xFF0C;Consumer&#x4F1A;&#x4F7F;&#x7528;Consumer&#x7AEF;&#x7684;&#x5168;&#x5C40;&#x8BBE;&#x7F6E;&#xFF0C;&#x8FD9;&#x5BF9;&#x4E8E;Provider&#x4E0D;&#x53EF;&#x63A7;&#x7684;&#xFF0C;&#x5E76;&#x4E14;&#x5F80;&#x5F80;&#x662F;&#x4E0D;&#x5408;&#x7406;&#x7684;&#x3002;</li>
</ul>
<p>PS: &#x914D;&#x7F6E;&#x7684;&#x8986;&#x76D6;&#x89C4;&#x5219;&#xFF1A;1) &#x65B9;&#x6CD5;&#x7EA7;&#x914D;&#x7F6E;&#x522B;&#x4F18;&#x4E8E;&#x63A5;&#x53E3;&#x7EA7;&#x522B;&#xFF0C;&#x5373;&#x5C0F;Scope&#x4F18;&#x5148; 2) Consumer&#x7AEF;&#x914D;&#x7F6E; &#x4F18;&#x4E8E; Provider &#x914D;&#x7F6E; &#x4F18;&#x4E8E;&#x5168;&#x5C40;&#x914D;&#x7F6E;&#xFF0C;&#x6700;&#x540E;&#x662F;Dubbo Hard Code&#x7684;&#x914D;&#x7F6E;&#x503C;&#xFF08;&#x89C1;<a href="user-guide-configuration-ref#&#x914D;&#x7F6E;&#x53C2;&#x8003;&#x624B;&#x518C;">Dubbo&#x914D;&#x7F6E;&#x53C2;&#x8003;&#x624B;&#x518C;</a>&#xFF09;</p>
<p>Provider&#x4E0A;&#x5C3D;&#x91CF;&#x591A;&#x914D;&#x7F6E;Consumer&#x7AEF;&#x7684;&#x5C5E;&#x6027;&#xFF0C;&#x8BA9;Provider&#x5B9E;&#x73B0;&#x8005;&#x4E00;&#x5F00;&#x59CB;&#x5C31;&#x601D;&#x8003;Provider&#x670D;&#x52A1;&#x7279;&#x70B9;&#x3001;&#x670D;&#x52A1;&#x8D28;&#x91CF;&#x7684;&#x95EE;&#x9898;&#x3002;</p>
<p>&#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">dubbo:service</span> <span class="hljs-attr">interface</span>=<span class="hljs-string">&quot;com.alibaba.hello.api.HelloService&quot;</span> <span class="hljs-attr">version</span>=<span class="hljs-string">&quot;1.0.0&quot;</span> <span class="hljs-attr">ref</span>=<span class="hljs-string">&quot;helloService&quot;</span>
<span class="hljs-attr">timeout</span>=<span class="hljs-string">&quot;300&quot;</span> <span class="hljs-attr">retry</span>=<span class="hljs-string">&quot;2&quot;</span> <span class="hljs-attr">loadbalance</span>=<span class="hljs-string">&quot;random&quot;</span> <span class="hljs-attr">actives</span>=<span class="hljs-string">&quot;0&quot;</span>
/&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">dubbo:service</span> <span class="hljs-attr">interface</span>=<span class="hljs-string">&quot;com.alibaba.hello.api.WorldService&quot;</span> <span class="hljs-attr">version</span>=<span class="hljs-string">&quot;1.0.0&quot;</span> <span class="hljs-attr">ref</span>=<span class="hljs-string">&quot;helloService&quot;</span>
<span class="hljs-attr">timeout</span>=<span class="hljs-string">&quot;300&quot;</span> <span class="hljs-attr">retry</span>=<span class="hljs-string">&quot;2&quot;</span> <span class="hljs-attr">loadbalance</span>=<span class="hljs-string">&quot;random&quot;</span> <span class="hljs-attr">actives</span>=<span class="hljs-string">&quot;0&quot;</span> &gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">dubbo:method</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;findAllPerson&quot;</span> <span class="hljs-attr">timeout</span>=<span class="hljs-string">&quot;10000&quot;</span> <span class="hljs-attr">retries</span>=<span class="hljs-string">&quot;9&quot;</span> <span class="hljs-attr">loadbalance</span>=<span class="hljs-string">&quot;leastactive&quot;</span> <span class="hljs-attr">actives</span>=<span class="hljs-string">&quot;5&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">dubbo:service</span>/&gt;</span>
</code></pre>
<p>&#x5728;Provider&#x53EF;&#x4EE5;&#x914D;&#x7F6E;&#x7684;Consumer&#x7AEF;&#x5C5E;&#x6027;&#x6709;&#xFF1A;</p>
<ol>
<li><code>timeout</code> &#x65B9;&#x6CD5;&#x8C03;&#x7528;&#x8D85;&#x65F6;</li>
<li><code>retries</code> &#x5931;&#x8D25;&#x91CD;&#x8BD5;&#x6B21;&#x6570;&#xFF0C;&#x7F3A;&#x7701;&#x662F;2&#xFF08;&#x8868;&#x793A;&#x52A0;&#x4E0A;&#x7B2C;&#x4E00;&#x6B21;&#x8C03;&#x7528;&#xFF0C;&#x4F1A;&#x8C03;&#x7528;3&#x6B21;&#xFF09;</li>
<li><code>loadbalance</code> &#x8D1F;&#x8F7D;&#x5747;&#x8861;&#x7B97;&#x6CD5;&#xFF08;&#x6709;&#x591A;&#x4E2A;Provider&#x65F6;&#xFF0C;&#x5982;&#x4F55;&#x6311;&#x9009;Provider&#x8C03;&#x7528;&#xFF09;&#xFF0C;&#x7F3A;&#x7701;&#x662F;&#x968F;&#x673A;&#xFF08;random&#xFF09;&#x3002;&#x8FD8;&#x53EF;&#x4EE5;&#x6709;&#x8F6E;&#x8BE2;(roundrobin)&#x3001;&#x6700;&#x4E0D;&#x6D3B;&#x8DC3;&#x4F18;&#x5148;&#xFF08;leastactive&#xFF0C;&#x6307;&#x4ECE;Consumer&#x7AEF;&#x5E76;&#x53D1;&#x8C03;&#x7528;&#x6700;&#x597D;&#x7684;Provider&#xFF0C;&#x53EF;&#x4EE5;&#x51CF;&#x5C11;&#x7684;&#x53CD;&#x5E94;&#x6162;&#x7684;Provider&#x7684;&#x8C03;&#x7528;&#xFF0C;&#x56E0;&#x4E3A;&#x53CD;&#x5E94;&#x66F4;&#x5BB9;&#x6613;&#x7D2F;&#x79EF;&#x5E76;&#x53D1;&#x7684;&#x8C03;&#x7528;&#xFF09;</li>
<li><code>actives</code> &#x6D88;&#x8D39;&#x8005;&#x7AEF;&#xFF0C;&#x6700;&#x5927;&#x5E76;&#x53D1;&#x8C03;&#x7528;&#x9650;&#x5236;&#xFF0C;&#x5373;&#x5F53;Consumer&#x5BF9;&#x4E00;&#x4E2A;&#x670D;&#x52A1;&#x7684;&#x5E76;&#x53D1;&#x8C03;&#x7528;&#x5230;&#x4E0A;&#x9650;&#x540E;&#xFF0C;&#x65B0;&#x8C03;&#x7528;&#x4F1A;Wait&#x76F4;&#x5230;&#x8D85;&#x65F6;&#x3002;
&#x5728;&#x65B9;&#x6CD5;&#x4E0A;&#x914D;&#x7F6E;&#xFF08;dubbo:method &#xFF09;&#x5219;&#x5E76;&#x53D1;&#x9650;&#x5236;&#x9488;&#x5BF9;&#x65B9;&#x6CD5;&#xFF0C;&#x5728;&#x63A5;&#x53E3;&#x4E0A;&#x914D;&#x7F6E;&#xFF08;dubbo:service&#xFF09;&#xFF0C;&#x5219;&#x5E76;&#x53D1;&#x9650;&#x5236;&#x9488;&#x5BF9;&#x670D;&#x52A1;&#x3002;</li>
</ol>
<p>&#x8BE6;&#x7EC6;&#x914D;&#x7F6E;&#x8BF4;&#x660E;&#x53C2;&#x89C1;&#xFF1A;<a href="reference-xmlconf/introduction.html">Dubbo&#x914D;&#x7F6E;&#x53C2;&#x8003;&#x624B;&#x518C;</a></p>
<h4 id="provider&#x4E0A;&#x914D;&#x7F6E;&#x5408;&#x7406;&#x7684;provider&#x7AEF;&#x5C5E;&#x6027;">Provider&#x4E0A;&#x914D;&#x7F6E;&#x5408;&#x7406;&#x7684;Provider&#x7AEF;&#x5C5E;&#x6027;</h4>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">dubbo:protocol</span> <span class="hljs-attr">threads</span>=<span class="hljs-string">&quot;200&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">dubbo:service</span> <span class="hljs-attr">interface</span>=<span class="hljs-string">&quot;com.alibaba.hello.api.HelloService&quot;</span> <span class="hljs-attr">version</span>=<span class="hljs-string">&quot;1.0.0&quot;</span> <span class="hljs-attr">ref</span>=<span class="hljs-string">&quot;helloService&quot;</span>
<span class="hljs-attr">executes</span>=<span class="hljs-string">&quot;200&quot;</span> &gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">dubbo:method</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;findAllPerson&quot;</span> <span class="hljs-attr">executes</span>=<span class="hljs-string">&quot;50&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">dubbo:service</span>&gt;</span>
</code></pre>
<p>Provider&#x4E0A;&#x53EF;&#x4EE5;&#x914D;&#x7F6E;&#x7684;Provider&#x7AEF;&#x5C5E;&#x6027;&#x6709;&#xFF1A;</p>
<ol>
<li><code>threads</code> &#x670D;&#x52A1;&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x5C0F;</li>
<li><code>executes</code> &#x4E00;&#x4E2A;&#x670D;&#x52A1;&#x63D0;&#x4F9B;&#x8005;&#x5E76;&#x884C;&#x6267;&#x884C;&#x8BF7;&#x6C42;&#x4E0A;&#x9650;&#xFF0C;&#x5373;&#x5F53;Provider&#x5BF9;&#x4E00;&#x4E2A;&#x670D;&#x52A1;&#x7684;&#x5E76;&#x53D1;&#x8C03;&#x7528;&#x5230;&#x4E0A;&#x9650;&#x540E;&#xFF0C;&#x65B0;&#x8C03;&#x7528;&#x4F1A;Wait&#xFF08;Consumer&#x53EF;&#x80FD;&#x5230;&#x8D85;&#x65F6;&#xFF09;&#x3002;&#x5728;&#x65B9;&#x6CD5;&#x4E0A;&#x914D;&#x7F6E;&#xFF08;dubbo:method &#xFF09;&#x5219;&#x5E76;&#x53D1;&#x9650;&#x5236;&#x9488;&#x5BF9;&#x65B9;&#x6CD5;&#xFF0C;&#x5728;&#x63A5;&#x53E3;&#x4E0A;&#x914D;&#x7F6E;&#xFF08;dubbo:service&#xFF09;&#xFF0C;&#x5219;&#x5E76;&#x53D1;&#x9650;&#x5236;&#x9488;&#x5BF9;&#x670D;&#x52A1;&#x3002;</li>
</ol>
<h4 id="&#x914D;&#x7F6E;&#x4E0A;&#x7BA1;&#x7406;&#x4FE1;&#x606F;">&#x914D;&#x7F6E;&#x4E0A;&#x7BA1;&#x7406;&#x4FE1;&#x606F;</h4>
<p>&#x76EE;&#x524D;&#x6709;&#x8D1F;&#x8D23;&#x4EBA;&#x4FE1;&#x606F;&#x548C;&#x7EC4;&#x7EC7;&#x4FE1;&#x606F;&#xFF08;&#x7528;&#x4E8E;&#x533A;&#x5206;&#x7AD9;&#x70B9;&#xFF09;&#x3002;&#x6709;&#x95EE;&#x9898;&#x65F6;&#x4FBF;&#x4E8E;&#x7684;&#x627E;&#x5230;&#x670D;&#x52A1;&#x7684;&#x8D1F;&#x8D23;&#x4EBA;&#xFF0C;&#x81F3;&#x5C11;&#x5199;&#x4E24;&#x4E2A;&#x4EBA;&#x4EE5;&#x4FBF;&#x5907;&#x4EFD;&#x3002;&#x8D1F;&#x8D23;&#x4EBA;&#x548C;&#x7EC4;&#x7EC7;&#x7684;&#x4FE1;&#x606F;&#x53EF;&#x4EE5;&#x5728;&#x6CE8;&#x518C;&#x4E2D;&#x5FC3;&#x7684;&#x4E0A;&#x770B;&#x5230;&#x3002;</p>
<p>&#x793A;&#x4F8B;&#xFF1A;</p>
<p><strong>&#x5E94;&#x7528;&#x914D;&#x7F6E;&#x8D1F;&#x8D23;&#x4EBA;&#x3001;&#x7EC4;&#x7EC7;</strong></p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">dubbo:application</span> <span class="hljs-attr">owner</span>=<span class="hljs-string">&#x201D;ding.lid,william.liangf&#x201D;</span> <span class="hljs-attr">organization</span>=<span class="hljs-string">&#x201D;intl&#x201D;</span> /&gt;</span>
</code></pre>
<p><strong>service&#x914D;&#x7F6E;&#x8D1F;&#x8D23;&#x4EBA;</strong></p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">dubbo:service</span> <span class="hljs-attr">owner</span>=<span class="hljs-string">&#x201D;ding.lid,william.liangf&#x201D;</span> /&gt;</span>
</code></pre>
<p><strong>reference&#x914D;&#x7F6E;&#x8D1F;&#x8D23;&#x4EBA;</strong></p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">dubbo:reference</span> <span class="hljs-attr">owner</span>=<span class="hljs-string">&#x201D;ding.lid,william.liangf&#x201D;</span> /&gt;</span>
</code></pre>
<p>dubbo:service&#x3001;dubbo:reference&#x6CA1;&#x6709;&#x914D;&#x7F6E;&#x8D1F;&#x8D23;&#x4EBA;&#xFF0C;&#x5219;&#x4F7F;&#x7528;dubbo:application&#x8BBE;&#x7F6E;&#x7684;&#x8D1F;&#x8D23;&#x4EBA;&#x3002;</p>
<h4 id="&#x914D;&#x7F6E;&#x4E0A;dubbo&#x7F13;&#x5B58;&#x6587;&#x4EF6;">&#x914D;&#x7F6E;&#x4E0A;Dubbo&#x7F13;&#x5B58;&#x6587;&#x4EF6;</h4>
<p>&#x914D;&#x7F6E;&#x65B9;&#x6CD5;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><strong>&#x63D0;&#x4F9B;&#x8005;&#x5217;&#x8868;&#x7F13;&#x5B58;&#x6587;&#x4EF6;</strong></p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">dubbo:registry</span> <span class="hljs-attr">file</span>=<span class="hljs-string">&#x201D;${user.home}</span>/<span class="hljs-attr">output</span>/<span class="hljs-attr">dubbo.cache</span>&#x201D; /&gt;</span>
</code></pre>
<p>&#x6CE8;&#x610F;&#xFF1A;</p>
<ol>
<li>&#x6587;&#x4EF6;&#x7684;&#x8DEF;&#x5F84;&#xFF0C;&#x5E94;&#x7528;&#x53EF;&#x4EE5;&#x6839;&#x636E;&#x9700;&#x8981;&#x8C03;&#x6574;&#xFF0C;&#x4FDD;&#x8BC1;&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x4E0D;&#x4F1A;&#x5728;&#x53D1;&#x5E03;&#x8FC7;&#x7A0B;&#x4E2D;&#x88AB;&#x6E05;&#x9664;&#x3002;</li>
<li>&#x5982;&#x679C;&#x6709;&#x591A;&#x4E2A;&#x5E94;&#x7528;&#x8FDB;&#x7A0B;&#x6CE8;&#x610F;&#x4E0D;&#x8981;&#x4F7F;&#x7528;&#x540C;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#xFF0C;&#x907F;&#x514D;&#x5185;&#x5BB9;&#x88AB;&#x8986;&#x76D6;&#x3002;</li>
</ol>
<p>&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x4F1A;&#x7F13;&#x5B58;&#xFF1A;</p>
<ol>
<li>&#x6CE8;&#x518C;&#x4E2D;&#x5FC3;&#x7684;&#x5217;&#x8868;</li>
<li>&#x670D;&#x52A1;&#x63D0;&#x4F9B;&#x8005;&#x5217;&#x8868;</li>
</ol>
<p>&#x6709;&#x4E86;&#x8FD9;&#x9879;&#x914D;&#x7F6E;&#x540E;&#xFF0C;&#x5F53;&#x5E94;&#x7528;&#x91CD;&#x542F;&#x8FC7;&#x7A0B;&#x4E2D;&#xFF0C;Dubbo&#x6CE8;&#x518C;&#x4E2D;&#x5FC3;&#x4E0D;&#x53EF;&#x7528;&#x65F6;&#x5219;&#x5E94;&#x7528;&#x4F1A;&#x4ECE;&#x8FD9;&#x4E2A;&#x7F13;&#x5B58;&#x6587;&#x4EF6;&#x8BFB;&#x53D6;&#x670D;&#x52A1;&#x63D0;&#x4F9B;&#x8005;&#x5217;&#x8868;&#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x8FDB;&#x4E00;&#x6B65;&#x4FDD;&#x8BC1;&#x5E94;&#x7528;&#x53EF;&#x9760;&#x6027;&#x3002;</p>
<h4 id="&#x76D1;&#x63A7;&#x914D;&#x7F6E;">&#x76D1;&#x63A7;&#x914D;&#x7F6E;</h4>
<ol>
<li><p>&#x4F7F;&#x7528;&#x56FA;&#x5B9A;&#x7AEF;&#x53E3;&#x66B4;&#x9732;&#x670D;&#x52A1;&#xFF0C;&#x800C;&#x4E0D;&#x8981;&#x4F7F;&#x7528;&#x968F;&#x673A;&#x7AEF;&#x53E3;</p>
<p> &#x8FD9;&#x6837;&#x5728;&#x6CE8;&#x518C;&#x4E2D;&#x5FC3;&#x63A8;&#x9001;&#x6709;&#x5EF6;&#x8FDF;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x6D88;&#x8D39;&#x8005;&#x901A;&#x8FC7;&#x7F13;&#x5B58;&#x5217;&#x8868;&#x4E5F;&#x80FD;&#x8C03;&#x7528;&#x5230;&#x539F;&#x5730;&#x5740;&#xFF0C;&#x4FDD;&#x8BC1;&#x8C03;&#x7528;&#x6210;&#x529F;&#x3002;</p>
</li>
<li><p>&#x4F7F;&#x7528;Dragoon&#x7684;http&#x76D1;&#x63A7;&#x9879;&#x76D1;&#x63A7;&#x6CE8;&#x518C;&#x4E2D;&#x5FC3;&#x4E0A;&#x670D;&#x52A1;&#x63D0;&#x4F9B;&#x65B9;</p>
<p> Dragoon&#x76D1;&#x63A7;&#x670D;&#x52A1;&#x5728;&#x6CE8;&#x518C;&#x4E2D;&#x5FC3;&#x4E0A;&#x7684;&#x72B6;&#x6001;&#xFF1A;<a href="http://dubbo-reg1.hst.xyi.cn.alidc.net:8080/status/com.alibaba.morgan.member.MemberService:1.0.5" target="_blank">http://dubbo-reg1.hst.xyi.cn.alidc.net:8080/status/com.alibaba.morgan.member.MemberService:1.0.5</a> &#x786E;&#x4FDD;&#x6CE8;&#x518C;&#x4E2D;&#x5FC3;&#x4E0A;&#x6709;&#x8BE5;&#x670D;&#x52A1;&#x7684;&#x5B58;&#x5728;&#x3002;</p>
</li>
<li><p>&#x670D;&#x52A1;&#x63D0;&#x4F9B;&#x65B9;&#xFF0C;&#x4F7F;&#x7528;Dragoon&#x7684;telnet&#x6216;shell&#x76D1;&#x63A7;&#x9879;</p>
<p> &#x76D1;&#x63A7;&#x670D;&#x52A1;&#x63D0;&#x4F9B;&#x8005;&#x7AEF;&#x53E3;&#x72B6;&#x6001;&#xFF1A;<code>echo status | nc -i 1 20880 | grep OK | wc -l</code>&#xFF0C;&#x5176;&#x4E2D;&#x7684;20880&#x4E3A;&#x670D;&#x52A1;&#x7AEF;&#x53E3;</p>
</li>
<li><p>&#x670D;&#x52A1;&#x6D88;&#x8D39;&#x65B9;&#xFF0C;&#x901A;&#x8FC7;&#x5C06;&#x670D;&#x52A1;&#x5F3A;&#x5236;&#x8F6C;&#x578B;&#x4E3A;EchoService&#xFF0C;&#x5E76;&#x8C03;&#x7528;$echo()&#x6D4B;&#x8BD5;&#x8BE5;&#x670D;&#x52A1;&#x7684;&#x63D0;&#x4F9B;&#x8005;&#x662F;&#x53EF;&#x7528;</p>
<p> &#x5982; <code>assertEqauls(&#x201C;OK&#x201D;, ((EchoService)memberService).$echo(&#x201C;OK&#x201D;));</code></p>
</li>
</ol>
<h4 id="&#x4E0D;&#x8981;&#x4F7F;&#x7528;dubboproperties&#x6587;&#x4EF6;&#x914D;&#x7F6E;&#xFF0C;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#x5BF9;&#x5E94;xml&#x914D;&#x7F6E;">&#x4E0D;&#x8981;&#x4F7F;&#x7528;dubbo.properties&#x6587;&#x4EF6;&#x914D;&#x7F6E;&#xFF0C;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#x5BF9;&#x5E94;XML&#x914D;&#x7F6E;</h4>
<p>Dubbo2&#x4E2D;&#x6240;&#x6709;&#x7684;&#x914D;&#x7F6E;&#x9879;&#x90FD;&#x53EF;&#x4EE5;Spring&#x914D;&#x7F6E;&#x4E2D;&#xFF0C;&#x5E76;&#x4E14;&#x53EF;&#x4EE5;&#x9488;&#x5BF9;&#x5355;&#x4E2A;&#x670D;&#x52A1;&#x914D;&#x7F6E;&#x3002;</p>
<p>&#x5982;&#x5B8C;&#x5168;&#x4E0D;&#x914D;&#x7F6E;&#x4F7F;&#x7528;Dubbo&#x7F3A;&#x7701;&#x503C;&#xFF0C;&#x53C2;&#x89C1; <a href="reference-xmlconf/introduction.html">Dubbo&#x914D;&#x7F6E;&#x53C2;&#x8003;&#x624B;&#x518C;</a> &#x4E2D;&#x7684;&#x8BF4;&#x660E;&#x3002;</p>
<p>&#x5728;Dubbo1&#x4E2D;&#x9700;&#x8981;&#x5728;dubbo.properties&#x6587;&#x4EF6;&#x4E2D;&#x7684;&#x914D;&#x7F6E;&#x9879;&#xFF0C;Dubbo2&#x4E2D;&#x914D;&#x7F6E;&#x793A;&#x4F8B;&#x5982;&#x4E0B;&#xFF1A;</p>
<ol>
<li><p>&#x5E94;&#x7528;&#x540D; </p>
<pre><code class="lang-xml"> <span class="hljs-tag">&lt;<span class="hljs-name">dubbo:application</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;myalibaba&quot;</span> &gt;</span>
</code></pre>
<p> &#x5BF9;&#x5E94;dubbo.properties&#x4E2D;&#x7684;Key&#x540D;<code>dubbo.application.name</code></p>
</li>
<li><p>&#x6CE8;&#x518C;&#x4E2D;&#x5FC3;&#x5730;&#x5740;</p>
<pre><code class="lang-xml"> <span class="hljs-tag">&lt;<span class="hljs-name">dubbo:registry</span> <span class="hljs-attr">address</span>=<span class="hljs-string">&quot;11.22.33.44:9090&quot;</span> &gt;</span>
</code></pre>
<p> &#x5BF9;&#x5E94;dubbo.properties&#x4E2D;&#x7684;Key&#x540D;<code>dubbo.registry.address</code></p>
</li>
<li><p>&#x8C03;&#x7528;&#x8D85;&#x65F6;</p>
<p> &#x53EF;&#x4EE5;&#x5728;&#x591A;&#x4E2A;&#x914D;&#x7F6E;&#x9879;&#x8BBE;&#x7F6E;&#x8D85;&#x65F6;&#xFF0C;&#x7531;&#x4E0A;&#x81F3;&#x4E0B;&#x8986;&#x76D6;&#xFF08;&#x5373;&#x4E0A;&#x9762;&#x7684;&#x4F18;&#x5148;&#xFF09;&#xFF0C;&#x793A;&#x4F8B;&#x5982;&#x4E0B;&#xFF1A;</p>
<p> &#x5176;&#x5B83;&#x7684;&#x53C2;&#x6570;&#xFF08;retries&#x3001;loadbalance&#x3001;actives&#x7B49;&#xFF09;&#x7684;&#x8986;&#x76D6;&#x7B56;&#x7565;&#x4E5F;&#x4E00;&#x6837;&#x3002;</p>
<p> <strong>&#x63D0;&#x4F9B;&#x8005;&#x7AEF;&#x7279;&#x5B9A;&#x65B9;&#x6CD5;&#x7684;&#x914D;&#x7F6E;</strong></p>
<pre><code class="lang-xml"> <span class="hljs-tag">&lt;<span class="hljs-name">dubbo:service</span> <span class="hljs-attr">interface</span>=<span class="hljs-string">&quot;com.alibaba.xxx.XxxService&quot;</span> &gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">dubbo:method</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;findPerson&quot;</span> <span class="hljs-attr">timeout</span>=<span class="hljs-string">&quot;1000&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">dubbo:service</span>&gt;</span>
</code></pre>
<p> <strong>&#x63D0;&#x4F9B;&#x8005;&#x7AEF;&#x7279;&#x5B9A;&#x63A5;&#x53E3;&#x7684;&#x914D;&#x7F6E;</strong></p>
<pre><code class="lang-xml"> <span class="hljs-tag">&lt;<span class="hljs-name">dubbo:service</span> <span class="hljs-attr">interface</span>=<span class="hljs-string">&quot;com.alibaba.xxx.XxxService&quot;</span> <span class="hljs-attr">timeout</span>=<span class="hljs-string">&quot;200&quot;</span> /&gt;</span>
</code></pre>
<p> timeout&#x53EF;&#x4EE5;&#x5728;&#x591A;&#x5904;&#x8BBE;&#x7F6E;&#xFF0C;&#x914D;&#x7F6E;&#x9879;&#x53CA;&#x8986;&#x76D6;&#x89C4;&#x5219;&#x8BE6;&#x89C1;&#xFF1A; <a href="reference-xmlconf/introduction.html">Dubbo&#x914D;&#x7F6E;&#x53C2;&#x8003;&#x624B;&#x518C;</a></p>
<p> &#x5168;&#x5C40;&#x914D;&#x7F6E;&#x9879;&#x503C;&#xFF0C;&#x5BF9;&#x5E94;dubbo.properties&#x4E2D;&#x7684;Key&#x540D;<code>dubbo.service.invoke.timeout</code></p>
</li>
<li><p>&#x670D;&#x52A1;&#x63D0;&#x4F9B;&#x8005;&#x534F;&#x8BAE;&#x3001;&#x670D;&#x52A1;&#x7684;&#x76D1;&#x542C;&#x7AEF;&#x53E3;</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">dubbo:protocol</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;dubbo&quot;</span> <span class="hljs-attr">port</span>=<span class="hljs-string">&quot;20880&quot;</span> /&gt;</span>
</code></pre>
<p> &#x5BF9;&#x5E94;dubbo.properties&#x4E2D;&#x7684;Key&#x540D;<code>dubbo.service.protocol&#x3001;dubbo.service.server.port</code></p>
</li>
<li><p>&#x670D;&#x52A1;&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x5C0F;</p>
<pre><code class="lang-xml"> <span class="hljs-tag">&lt;<span class="hljs-name">dubbo:protocol</span> <span class="hljs-attr">threads</span>=<span class="hljs-string">&quot;100&quot;</span> /&gt;</span>
</code></pre>
<p> &#x5BF9;&#x5E94; dubbo.properties &#x4E2D;&#x7684;Key&#x540D;<code>dubbo.service.max.thread.threads.size</code></p>
</li>
<li><p>&#x6D88;&#x8D39;&#x8005;&#x542F;&#x52A8;&#x65F6;&#xFF0C;&#x6CA1;&#x6709;&#x63D0;&#x4F9B;&#x8005;&#x662F;&#x5426;&#x629B;&#x5F02;&#x5E38;Fast-Fail</p>
<pre><code class="lang-xml"> <span class="hljs-tag">&lt;<span class="hljs-name">dubbo:reference</span> <span class="hljs-attr">interface</span>=<span class="hljs-string">&quot;com.alibaba.xxx.XxxService&quot;</span> <span class="hljs-attr">check</span>=<span class="hljs-string">&quot;false&quot;</span> /&gt;</span>
</code></pre>
<p> &#x5BF9;&#x5E94; dubbo.properties &#x4E2D;&#x7684;Key&#x540D;<code>alibaba.intl.commons.dubbo.service.allow.no.provider</code></p>
</li>
</ol>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="best-practice.html" class="navigation navigation-prev " aria-label="Previous page: 11 服务化最佳实践">
<i class="fa fa-angle-left"></i>
</a>
<a href="capacity-plan.html" class="navigation navigation-next " aria-label="Next page: 13 容量规划">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"12 推荐用法","level":"1.13","depth":1,"next":{"title":"13 容量规划","level":"1.14","depth":1,"path":"capacity-plan.md","ref":"capacity-plan.md","articles":[]},"previous":{"title":"11 服务化最佳实践","level":"1.12","depth":1,"path":"best-practice.md","ref":"best-practice.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"recommend.md","mtime":"2017-08-02T06:13:38.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-08-02T07:36:36.721Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="gitbook/gitbook-plugin-search/search.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>