http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/08e1b43f/content/cn/docs/maven_dependency_management/index.html
----------------------------------------------------------------------
diff --git a/content/cn/docs/maven_dependency_management/index.html 
b/content/cn/docs/maven_dependency_management/index.html
new file mode 100644
index 0000000..d766a08
--- /dev/null
+++ b/content/cn/docs/maven_dependency_management/index.html
@@ -0,0 +1,888 @@
+<!doctype html>
+<!--
+  Minimal Mistakes Jekyll Theme 4.4.1 by Michael Rose
+  Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
+  Free for personal and commercial use under the MIT license
+  https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt
+-->
+<html lang="cn" class="no-js">
+  <head>
+    <meta charset="utf-8">
+
+<!-- begin SEO -->
+
+
+
+
+
+
+
+
+
+<title>使用maven管理复杂依赖关系的技巧 - Apache incubator 
ServiceComb</title>
+
+
+
+
+<meta name="description" content="maven dependency management">
+
+
+
+
+<meta name="author" content="liubao">
+
+<meta property="og:locale" content="cn">
+<meta property="og:site_name" content="Apache incubator ServiceComb">
+<meta property="og:title" content="使用maven管理复杂依赖å…
³ç³»çš„技巧">
+
+
+  <link rel="canonical" 
href="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/docs/maven_dependency_management/";>
+  <meta property="og:url" 
content="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/docs/maven_dependency_management/";>
+
+
+
+  <meta property="og:description" content="maven dependency management">
+
+
+
+  <meta name="twitter:site" content="@ServiceComb">
+  <meta name="twitter:title" content="使用maven管理复杂依赖å…
³ç³»çš„技巧">
+  <meta name="twitter:description" content="maven dependency management">
+  <meta name="twitter:url" content="">
+
+  
+    <meta name="twitter:card" content="summary">
+    
+  
+
+  
+    <meta name="twitter:creator" content="@liubao">
+  
+
+
+
+  
+
+  
+
+
+
+
+
+  <meta property="og:type" content="article">
+  <meta property="article:published_time" content="2017-09-14T00:00:00+08:00">
+
+
+
+
+
+
+
+
+  <script type="application/ld+json">
+    {
+      "@context" : "http://schema.org";,
+      "@type" : "Person",
+      "name" : "Apache incubator ServiceComb",
+      "url" : "http://github.com/pages/ServiceComb/servicesomb.github.io";,
+      "sameAs" : null
+    }
+  </script>
+
+
+
+  <meta name="google-site-verification" 
content="HvJjNd7vvJ-yjSTHlBiIWEYxp_Hrz-PYEY5Idz9LRcA" />
+
+
+
+
+<!-- end SEO -->
+
+
+<link href="/feed.xml" type="application/atom+xml" rel="alternate" 
title="Apache incubator ServiceComb Feed">
+
+<!-- http://t.co/dKP3o1e -->
+<meta name="HandheldFriendly" content="True">
+<meta name="MobileOptimized" content="320">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<script>
+  document.documentElement.className = 
document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
+</script>
+<script 
src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js";></script>
+<script src="/assets/js/prism.js"></script>
+
+<script type="text/javascript" async
+  
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML";>
+</script>
+
+<link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css";
 
integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
 crossorigin="anonymous">
+
+<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"; 
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
 crossorigin="anonymous"></script>
+<script 
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"; 
integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
 crossorigin="anonymous"></script>
+<script 
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"; 
integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
 crossorigin="anonymous"></script>
+<!-- For all browsers -->
+<link rel="stylesheet" href="/assets/css/main.css">
+<link rel="stylesheet" href="/assets/css/prism.css">
+
+<!--[if lte IE 9]>
+  <style>
+    /* old IE unsupported flexbox fixes */
+    .greedy-nav .site-title {
+      padding-right: 3em;
+    }
+    .greedy-nav button {
+      position: absolute;
+      top: 0;
+      right: 0;
+      height: 100%;
+    }
+  </style>
+<![endif]-->
+
+<meta http-equiv="cleartype" content="on">
+
+    <!-- start custom head snippets -->
+
+<!-- insert favicons. use http://realfavicongenerator.net/ -->
+<link 
href="https://fonts.cat.net/css?family=Roboto:400,500,700|Source+Code+Pro" 
rel="stylesheet">
+<script src="/assets/js/custom.js"></script>
+<!-- end custom head snippets -->
+
+  </head>
+
+  <body class="layout--single">
+
+    <!--[if lt IE 9]>
+<div class="notice--danger align-center" style="margin: 0;">You are using an 
<strong>outdated</strong> browser. Please <a 
href="http://browsehappy.com/";>upgrade your browser</a> to improve your 
experience.</div>
+<![endif]-->
+    <div class="masthead">
+  <div class="masthead__inner-wrap">
+    <div class="masthead__menu">
+      <nav id="site-nav" class="greedy-nav">
+             
+          <a class="site-title active" href="/cn"><img 
src="//assets/images/ServiceComb-logo-1.png"></a>
+             
+        <ul class="visible-links">
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/docs/quick-start/">快速入门</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/users/">用户手册</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/developers/">开发者手册</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/year-archive/">博文</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/faqs/">常见问题</a>
+              
+            </li>
+          
+        </ul>
+        <button><div class="navicon"></div></button>
+        <ul class="hidden-links hidden"></ul>
+        <div class="nav-lang">
+          
+            
+            
+            <a href=/docs/maven_dependency_management/>English</a>
+          
+        </div>
+      </nav>
+    </div>
+  </div>
+</div>
+
+
+    
+
+
+
+<div id="main" role="main">
+  
+  <div class="sidebar sticky">
+      
+      <div class="back-to-home">首页 > <a href="/cn/">ServiceComb</a></div>
+      
+  
+
+<div itemscope itemtype="http://schema.org/Person";>
+
+  
+    <div class="author__avatar">
+      
+        <img src="/assets/images/ServiceComb-logo-3.jpg" 
class="author__avatar" alt="" itemprop="image">
+      
+    </div>
+  
+
+  <div class="author__content">
+    <h3 class="author__name" itemprop="name"></h3>
+    
+      <p class="author__bio" itemprop="description">
+           
+             
+               ServiceComb提供了一套å…
³äºŽæœåŠ¡æ³¨å†Œï¼ŒæœåŠ¡å‘现,服务é…
ç½®ä»¥åŠç®¡ç†åŠŸèƒ½çš„微服务框架
+             
+           
+      </p>
+    
+  </div>
+
+  <div class="author__urls-wrapper">
+    <button class="btn btn--inverse">关注</button>
+    <ul class="author__urls social-icons">
+      
+        <li itemprop="homeLocation" itemscope 
itemtype="http://schema.org/Place";>
+        
+          
+            <i class="fa fa-fw fa-map-marker" aria-hidden="true"></i> <span 
itemprop="name">中国</span>
+          
+        
+        </li>
+      
+
+      
+
+      
+        <li>
+          <a href="mailto:servicecomb-develop...@googlegroups.com";>
+            <meta itemprop="email" 
content="servicecomb-develop...@googlegroups.com" />
+            <i class="fa fa-fw fa-envelope-square" aria-hidden="true"></i> 
电子邮箱
+          </a>
+        </li>
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+        <li>
+          <a href="https://github.com/ServiceComb"; itemprop="sameAs">
+            <i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub
+          </a>
+        </li>
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      <!--
+  <li>
+    <a href="http://link-to-whatever-social-network.com/user/"; 
itemprop="sameAs">
+      <i class="fa fa-fw" aria-hidden="true"></i> Custom Social Profile Link
+    </a>
+  </li>
+-->
+    </ul>
+  </div>
+</div>
+
+  
+  </div>
+
+
+
+  <article class="page" itemscope itemtype="http://schema.org/CreativeWork";>
+    <meta itemprop="headline" content="使用maven管理复杂依赖å…
³ç³»çš„技巧">
+    <meta itemprop="description" content="maven dependency management">
+    <meta itemprop="datePublished" content="September 14, 2017">
+    <meta itemprop="dateModified" content="September 14, 2017">
+
+    <div class="page__inner-wrap">
+      
+        
+          <header>
+            <h1 class="page__title" 
itemprop="headline">使用maven管理复杂依赖关系的技巧
+</h1>
+            
+              <p class="page__meta"><i class="fa fa-clock-o" 
aria-hidden="true"></i> 
+
+
+
+
+  少于 1 分钟 阅读
+
+</p>
+            
+          </header>
+        
+      
+
+      <section class="page__content" itemprop="text">
+        <h2 id="依赖关系管理的核心问题">依赖关系管理的æ 
¸å¿ƒé—®é¢˜</h2>
+<p>依赖å…
³ç³»ç®¡ç†æœ€è®©äººå¤´ç–¼çš„问题是软件版本的选择。一个简化的例子:开发人员目前需要开发一个X项目,该项目需要同时引用项目A提供的组件,也需要引用项目B的组件,并且项目A和项目B同时依赖了项目C,但是版本号不同。</p>
+
+<ul>
+  <li>项目X的pom:</li>
+</ul>
+
+<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span 
class="nt">&lt;dependency&gt;</span>
+       <span class="nt">&lt;groupId&gt;</span>groupA<span 
class="nt">&lt;/groupId&gt;</span>
+       <span class="nt">&lt;artifactId&gt;</span>artifactA<span 
class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;version&gt;</span>0.1.0<span 
class="nt">&lt;/version&gt;</span>   
+<span class="nt">&lt;/dependency&gt;</span>
+<span class="nt">&lt;dependency&gt;</span>
+       <span class="nt">&lt;groupId&gt;</span>groupB<span 
class="nt">&lt;/groupId&gt;</span>
+       <span class="nt">&lt;artifactId&gt;</span>artifactB<span 
class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;version&gt;</span>0.1.0<span 
class="nt">&lt;/version&gt;</span>   
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
+
+<ul>
+  <li>项目A的pom:</li>
+</ul>
+
+<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span 
class="nt">&lt;dependency&gt;</span>
+       <span class="nt">&lt;groupId&gt;</span>groupC<span 
class="nt">&lt;/groupId&gt;</span>
+       <span class="nt">&lt;artifactId&gt;</span>artifactC<span 
class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;version&gt;</span>0.1.0<span 
class="nt">&lt;/version&gt;</span>   
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
+
+<ul>
+  <li>项目B的pom:</li>
+</ul>
+
+<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span 
class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>groupC<span 
class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>artifactC<span 
class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>0.2.0<span 
class="nt">&lt;/version&gt;</span>   
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
+
+<p>项目X在最终发布的时候,会出现如下几种情况:</p>
+
+<ol>
+  
<li>使用项目C的0.1.0版本。由于项目B是使用0.2.0版本编译和测试的,那么组件B可能æ—
 æ³•æ­£å¸¸å·¥ä½œã€‚比如项目B使用了0.2.0提供的新接口。</li>
+  
<li>使用项目C的0.2.0版本。由于项目A是使用0.1.0版本编译和测试的,那么组件A可能æ—
 æ³•æ­£å¸¸å·¥ä½œã€‚比如0.2.0版本和0.1.0不å…
¼å®¹ï¼Œå¹¶ä¸”项目A恰好使用了这些不兼容的接口。</li>
+</ol>
+
+<p>可以看出,如果项目A和项目B使用的C组件存在接口不å…
¼å®¹çš„情况,无论怎么调整,项目X都无
法正常工作,这个时候必须修改项目A的代码,使用和B同æ 
·çš„或者兼容的版本进行测试。进行依赖管理,能够做的事情
,通常是保证对于公å…
±ç»„件的依赖,都使用较高的版本。尽管如此,我们通常还是会碰到一系列问题,特别是项目依赖å
…³ç³»éžå¸¸å¤æ‚的情况。</p>
+
+<h2 id="最佳实践">最佳实践</h2>
+<p>很多项目都使用maven提供的dependencyManagementé…
ç½®æ¥ç®¡ç†ä¾èµ–关系,保证不会因为引å…
¥äº†æ–°çš„组件,导致基础组件的版本发生变更,出现漏测试的æƒ
…况。该机制在Spring 
boot、ServiceComb等开源项目中广泛采用。对于需要提供额外三方软件使用æ¸
…
单的商用产品,这种管理方式可以增强认证信息的准确性。以ServiceComb为例,该项目引å
…¥çš„所有的三方件的版本都统一在:<br />
+ <a 
href="https://github.com/ServiceComb/ServiceComb-Java-Chassis/blob/master/java-chassis-dependencies/pom.xml";>https://github.com/ServiceComb/ServiceComb-Java-Chassis/blob/master/java-chassis-dependencies/pom.xml</a>
 <br />
+管理,其他的子模块都不é…
ç½®ä¸‰æ–¹ä»¶çš„版本号,从而每个子模块依赖的三方件版本都是同一个版本,即使他们依赖的模块间接依赖了不同的三方件版本。<br
 />
+这种机制给使用者也带来了一定的好处,使用者
可以采用dependencyManagement来定义自己的三方组件依赖å…
³ç³»ï¼Œå®šä¹‰çš„时候,通过import方式继承。比如使用ServiceComb的微服务,可以采用如下方式管理依赖å
…³ç³»ï¼š</p>
+
+<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span 
class="nt">&lt;dependencyManagement&gt;</span>
+  <span class="nt">&lt;dependencies&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>io.servicecomb<span 
class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>java-chassis-dependencies<span 
class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>0.2.0<span 
class="nt">&lt;/version&gt;</span>
+      <span class="nt">&lt;type&gt;</span>pom<span 
class="nt">&lt;/type&gt;</span>
+      <span class="nt">&lt;scope&gt;</span>import<span 
class="nt">&lt;/scope&gt;</span>
+      <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;/dependencies&gt;</span>
+<span class="nt">&lt;/dependencyManagement&gt;</span>
+</code></pre>
+</div>
+
+<h2 id="一个复杂的例子">一个复杂的例子</h2>
+<p>这个例子是在业务代码中使用Spring Boot、Spring 
Cloud、ServiceComb开源组件和ServiceComb商用组件的复杂场景。业务使用Spring
 Boot开发,并且启用了ServiceComb功能。可以通过下面的é…
ç½®ç®¡ç†ä¾èµ–关系。通过调整3个组件的顺序,决定优å…
ˆä½¿ç”¨å“ªäº›ä¸‰æ–¹ä»¶ã€‚常见的业务场景有:</p>
+
+<ul>
+  <li>Spring Cloud依赖于Spring Boot,业务发现Spring 
Boot的bug,并升级了Spring boot,但是Spring Cloud没有é…
å¥—对应版本的新版本。在Spring Boot接口兼容的情
况下,可以将Spring Boot的依赖放到Spring 
Cloud前面,从而达到独立升级Spring Boot的目的。</li>
+  <li>Spring 
Cloud发现了bug,但是修复该bug的版本同时升级了Spring 
Boot,业务当前有其他原因不能使用Spring 
Boot的新版本,这个时候,可以将Spring 
Boot的依赖放到前面,保证了不会由于升级Spring Cloud,而引å…
¥Spring Boot新的版本。</li>
+</ul>
+
+<div class="language-xml highlighter-rouge"><pre class="highlight"><code>    
<span class="nt">&lt;dependencyManagement&gt;</span>
+               <span class="nt">&lt;dependencies&gt;</span>
+                 <span class="nt">&lt;dependency&gt;</span>
+                       <span 
class="nt">&lt;groupId&gt;</span>org.springframework.boot<span 
class="nt">&lt;/groupId&gt;</span>
+                       <span 
class="nt">&lt;artifactId&gt;</span>spring-boot-dependencies<span 
class="nt">&lt;/artifactId&gt;</span>
+                       <span 
class="nt">&lt;version&gt;</span>1.5.6.RELEASE<span 
class="nt">&lt;/version&gt;</span>
+                       <span class="nt">&lt;type&gt;</span>pom<span 
class="nt">&lt;/type&gt;</span>
+                       <span class="nt">&lt;scope&gt;</span>import<span 
class="nt">&lt;/scope&gt;</span>
+                 <span class="nt">&lt;/dependency&gt;</span>
+                 <span class="nt">&lt;dependency&gt;</span>
+                       <span 
class="nt">&lt;groupId&gt;</span>org.springframework.cloud<span 
class="nt">&lt;/groupId&gt;</span>
+                       <span 
class="nt">&lt;artifactId&gt;</span>spring-cloud-dependencies<span 
class="nt">&lt;/artifactId&gt;</span>
+                       <span class="nt">&lt;version&gt;</span>Dalston.SR2<span 
class="nt">&lt;/version&gt;</span>
+                       <span class="nt">&lt;type&gt;</span>pom<span 
class="nt">&lt;/type&gt;</span>
+                       <span class="nt">&lt;scope&gt;</span>import<span 
class="nt">&lt;/scope&gt;</span>
+                 <span class="nt">&lt;/dependency&gt;</span>
+                 <span class="nt">&lt;dependency&gt;</span>
+                       <span 
class="nt">&lt;groupId&gt;</span>io.servicecomb<span 
class="nt">&lt;/groupId&gt;</span>
+                       <span 
class="nt">&lt;artifactId&gt;</span>java-chassis-dependencies<span 
class="nt">&lt;/artifactId&gt;</span>
+                       <span class="nt">&lt;version&gt;</span>0.2.0<span 
class="nt">&lt;/version&gt;</span>
+                       <span class="nt">&lt;type&gt;</span>pom<span 
class="nt">&lt;/type&gt;</span>
+                       <span class="nt">&lt;scope&gt;</span>import<span 
class="nt">&lt;/scope&gt;</span>
+                 <span class="nt">&lt;/dependency&gt;</span>
+                 <span class="nt">&lt;dependency&gt;</span>
+                       <span 
class="nt">&lt;groupId&gt;</span>com.huawei.paas.cse<span 
class="nt">&lt;/groupId&gt;</span>
+                       <span 
class="nt">&lt;artifactId&gt;</span>cse-dependency<span 
class="nt">&lt;/artifactId&gt;</span>
+                       <span class="nt">&lt;version&gt;</span>2.1.1<span 
class="nt">&lt;/version&gt;</span>
+                       <span class="nt">&lt;type&gt;</span>pom<span 
class="nt">&lt;/type&gt;</span>
+                       <span class="nt">&lt;scope&gt;</span>import<span 
class="nt">&lt;/scope&gt;</span>
+                 <span class="nt">&lt;/dependency&gt;</span>
+               <span class="nt">&lt;/dependencies&gt;</span>
+       <span class="nt">&lt;/dependencyManagement&gt;</span>
+</code></pre>
+</div>
+
+<h2 id="总结">总结</h2>
+<p>上面列举了依赖关系管理的最佳实践。在é…
å¥—不同组件进行业务代ç 
å¼€å‘时,如果碰到ClassNotFoundException、NoSuchMethodException等异常,可以通过IDE(比如eclipse)或è€
…mvn dependency:tree命令来分析是否由于依赖关系错误,引å…
¥äº†æŸäº›ä¸‰æ–¹ä»¶è¾ƒè€çš„版本,然后都可以利用dependencyManagement机制来强制约束三方件的版本号。正如最开始指出的,任何的三方件升级都可能存在风险,并且有些时候会出现æ—
 æ³•è§£å†³ï¼Œéœ€è¦ä¿®æ”¹ä¾èµ–组件代码的情
况。一个好的实践是进行持续的集成,并增加
适当的测试用例,尽早发现问题和解决依赖关系管理引å…
¥çš„接口不兼容问题。我们建议开发者
能够结合上面的例子,适当调整下各个组件的顺序,观察一个项目实é™
…
使用的三方件版本的变化,深刻理解dependencyManagement的作用原理,这æ
 ·èƒ½å¤Ÿå¸®åŠ©å¿«é€Ÿè§£å†³å¼€å‘过程中碰到的ClassNotFoundExcep
 tion、NoSuchMethodException等问题。</p>
+
+
+        
+      </section>
+
+      <footer class="page__meta">
+        
+        
+  
+
+
+  
+  
+  
+
+  <p class="page__taxonomy">
+    <strong><i class="fa fa-fw fa-tags" aria-hidden="true"></i> 标签: 
</strong>
+    <span itemprop="keywords">
+    
+      
+      
+      <a href="/tags/#maven" class="page__taxonomy-item" rel="tag">maven</a>
+    
+    </span>
+  </p>
+
+
+
+
+
+        
+          
+            
+              <p class="page__date"><strong><i class="fa fa-fw fa-calendar" 
aria-hidden="true"></i> 最新的:</strong> <time 
datetime="2017-09-14">2017年9月14日</time></p>
+            
+          
+        
+      </footer>
+
+      <section class="page__share">
+  
+    <h4 class="page__share-title">分享</h4>
+  
+
+  <a 
href="https://twitter.com/intent/tweet?via=ServiceComb&text=使用maven管理复杂依赖å
…³ç³»çš„技巧 /cn/docs/maven_dependency_management/" class="btn btn--twitter" 
title="分享 Twitter"><i class="fa fa-fw fa-twitter" 
aria-hidden="true"></i><span> Twitter</span></a>
+
+  <a 
href="https://www.facebook.com/sharer/sharer.php?u=/cn/docs/maven_dependency_management/";
 class="btn btn--facebook" title="分享 Facebook"><i class="fa fa-fw 
fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
+
+  <a 
href="https://plus.google.com/share?url=/cn/docs/maven_dependency_management/"; 
class="btn btn--google-plus" title="分享 Google Plus"><i class="fa fa-fw 
fa-google-plus" aria-hidden="true"></i><span> Google+</span></a>
+
+  <a 
href="https://www.linkedin.com/shareArticle?mini=true&url=/cn/docs/maven_dependency_management/";
 class="btn btn--linkedin" title="分享 LinkedIn"><i class="fa fa-fw 
fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
+</section>
+
+
+      
+  <nav class="pagination">
+    
+      <a href="/cn/docs/distributed_saga_1/" class="pagination--pager" 
title="ServiceComb中的数据最终一致性方案 - part 1
+">向前</a>
+    
+    
+      <a href="/cn/docs/performance-test-on-seckill-with-jmeter/" 
class="pagination--pager" title="使用JMeter对秒杀示例进行性能测试
+">向后</a>
+    
+  </nav>
+
+
+    </div>
+
+    
+      <div class="page__comments">
+  
+  
+    <section id="static-comments">
+      
+        <!-- Start static comments -->
+        <div class="js-comments">
+          
+        </div>
+        <!-- End static comments -->
+
+        <!-- Start new comment form -->
+        <h4 class="page__comments-title">留下评论</h4>
+        <p 
class="small">您的电子邮箱地址并不会被展示。请填写标记为必
须的字段。 <span class="required">*</span></p>
+        <form id="new_comment" class="page__comments-form js-form form" 
method="post" 
action="https://api.staticman.net/v1/entry/ServiceComb/servicesomb.github.io/master";>
+          <div class="form__spinner">
+            <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
+            <span class="sr-only">正在加载...</span>
+          </div>
+
+          <fieldset>
+            <label for="comment-form-message">评论 <small 
class="required">*</small></label>
+            <textarea type="text" rows="3" id="comment-form-message" 
name="fields[message]" tabindex="1"></textarea>
+            <div class="small help-block"><a 
href="https://daringfireball.net/projects/markdown/";>Markdown语法已支持。</a></div>
+          </fieldset>
+          <fieldset>
+            <label for="comment-form-name">姓名 <small 
class="required">*</small></label>
+            <input type="text" id="comment-form-name" name="fields[name]" 
tabindex="2" />
+          </fieldset>
+          <fieldset>
+            <label for="comment-form-email">电子邮箱 <small 
class="required">*</small></label>
+            <input type="email" id="comment-form-email" name="fields[email]" 
tabindex="3" />
+          </fieldset>
+          <fieldset>
+            <label for="comment-form-url">网站(可选)</label>
+            <input type="url" id="comment-form-url" name="fields[url]" 
tabindex="4"/>
+          </fieldset>
+          <fieldset class="hidden" style="display: none;">
+            <input type="hidden" name="options[slug]" 
value="maven-dependency-management">
+            <label for="comment-form-location">Not used. Leave blank if you 
are a human.</label>
+            <input type="text" id="comment-form-location" 
name="fields[hidden]" autocomplete="off"/>
+          </fieldset>
+          <!-- Start comment form alert messaging -->
+          <p class="hidden js-notice">
+            <strong class="js-notice-text"></strong>
+          </p>
+          <!-- End comment form alert messaging -->
+          <fieldset>
+            <button type="submit" id="comment-form-submit" tabindex="5" 
class="btn btn--large">提交评论</button>
+          </fieldset>
+        </form>
+        <!-- End new comment form -->
+      
+    </section>
+  
+</div>
+
+    
+  </article>
+
+  
+  
+    <div class="page__related">
+      <h4 class="page__related-title">猜您还喜欢</h4>
+      <div class="grid__wrapper">
+        
+          
+
+
+
+<div class="grid__item">
+  <article class="archive__item" itemscope 
itemtype="http://schema.org/CreativeWork";>
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/cn/docs/jira_beginner_guide/" rel="permalink">老司机带你
刷任务 - ServiceComb JIRA入门指南
+</a>
+      
+    </h2>
+    <p class="archive__item-excerpt" itemprop="description">ServiceComb JIRAå…
¥é—¨æŒ‡å—
+</p>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  少于 1 分钟 阅读
+
+</p>
+    
+  </article>
+</div>
+
+        
+          
+
+
+
+<div class="grid__item">
+  <article class="archive__item" itemscope 
itemtype="http://schema.org/CreativeWork";>
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/docs/service-center-ui/" rel="permalink">Service-Center 
Management UI Console
+</a>
+      
+    </h2>
+    <p class="archive__item-excerpt" itemprop="description">An introduction 
Service-Center Management Console
+</p>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  2 分钟 阅读
+
+</p>
+    
+  </article>
+</div>
+
+        
+          
+
+
+
+<div class="grid__item">
+  <article class="archive__item" itemscope 
itemtype="http://schema.org/CreativeWork";>
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/docs/service-center-ui/" rel="permalink">Service-Center 
Management UI Console
+</a>
+      
+    </h2>
+    <p class="archive__item-excerpt" itemprop="description">An introduction 
Service-Center Management Console
+</p>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  2 分钟 阅读
+
+</p>
+    
+  </article>
+</div>
+
+        
+          
+
+
+
+<div class="grid__item">
+  <article class="archive__item" itemscope 
itemtype="http://schema.org/CreativeWork";>
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/cn/docs/how-to-reform-a-legacy-system/" 
rel="permalink">最头疼的遗留系统该如何改造?
+</a>
+      
+    </h2>
+    <p class="archive__item-excerpt" 
itemprop="description">微服务是否是业界期待已久
的企业架构解决方案?在对遗留系统进行微服务的改造
过程中存在怎样的困难和挑战,应该注意些什么?
+</p>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  1 分钟 阅读
+
+</p>
+    
+  </article>
+</div>
+
+        
+      </div>
+    </div>
+  
+</div>
+
+
+    <script async 
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+    <div align="center" style="margin: 0 0;">
+    <ins class="adsbygoogle"
+         style="display:block; border-bottom: initial;"
+         data-ad-client="ca-pub-7328585512091257"
+         data-ad-slot="3049671934"
+         data-ad-format="auto"></ins>
+    </div>
+
+    <div class="page__footer">
+      <footer>
+        <!-- start custom footer snippets -->
+
+<!-- end custom footer snippets -->
+        <div class="container">
+  <div class="row justify-content-md-center">
+    
+    <div class="col">
+      <ul>
+        <p class="header">资源</p>
+        <li><a href="/cn/docs/quick-start/">快速入门</a></li>
+        <li><a href="/cn/users/user-guide/">用户指南</a></li>
+        <li><a href="/cn/slides/">资料</a></li>
+        <li><a href="/cn/users/faq/">常见问题</a></li>
+      </ul>
+    </div>
+    <div class="col">
+      <ul>
+        <p class="header">贡献</p>
+        <li><a 
href="https://github.com/ServiceComb/ServiceComb.github.io/issues/new?title=Issue
 with 
_posts/cn/2017-09-14-maven-dependency-management.md">报告本网页问题</a></li>
+        <li><a 
href="https://github.com/ServiceComb/ServiceComb.github.io/edit/master/_posts/cn/2017-09-14-maven-dependency-management.md";>在Github上编辑此页</a></li>
+        <li><a href="/cn/developers/submit-codes/">代码提交指南</a></li>
+      </ul>
+    </div>
+    <div class="col">
+      <ul class="social-icons">
+        <p class="header">社区</p>
+        <li>
+            <a 
href="https://groups.google.com/forum/#!forum/servicecomb-developers"; 
target="_blank"><span class="group">开发者</span></a> |
+            <a 
href="https://groups.google.com/forum/#!forum/servicecomb-users"; 
target="_blank">用户</span></a>
+        </li>
+        <li>
+            <a href="http://github.com/ServiceComb"; target="_blank"><span 
class="github">Github</span></a>
+        </li>
+        <li>
+            <a href="https://twitter.com/ServiceComb"; target="_blank"><span 
class="twitter">Twitter</span></a>
+        </li>
+        <li>
+            <a href="/feed.xml" target="_blank"><span 
class="rss">Feed</span></a>
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<div class="page__footer-bottom">
+  <div>&copy; 2017 Apache incubator ServiceComb. 技术来自于 <a 
href="http://jekyllrb.com"; rel="nofollow">Jekyll</a> &amp; <a 
href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/"; 
rel="nofollow">Minimal Mistakes</a>.</div>
+</div>
+
+      </footer>
+    </div>
+
+    <script src="/assets/js/main.min.js"></script>
+
+
+
+
+  <script>
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+  ga('create', 'UA-101622733-1', 'auto');
+  ga('send', 'pageview');
+</script>
+
+
+
+
+
+
+
+  
+  <script>
+    (function ($) {
+    var $comments = $('.js-comments');
+
+    $('#new_comment').submit(function () {
+      var form = this;
+
+      $(form).addClass('disabled');
+      $('#comment-form-submit').html('<i class="fa fa-spinner fa-spin 
fa-fw"></i> 正在加载...');
+
+      $.ajax({
+        type: $(this).attr('method'),
+        url: $(this).attr('action'),
+        data: $(this).serialize(),
+        contentType: 'application/x-www-form-urlencoded',
+        success: function (data) {
+          $('#comment-form-submit').html('已提交');
+          $('.page__comments-form .js-notice').removeClass('notice--danger');
+          $('.page__comments-form .js-notice').addClass('notice--success');
+          
showAlert('感谢您的评论!被批准后它会立即在此站点展示。');
+        },
+        error: function (err) {
+          console.log(err);
+          $('#comment-form-submit').html('提交评论');
+          $('.page__comments-form .js-notice').removeClass('notice--success');
+          $('.page__comments-form .js-notice').addClass('notice--danger');
+          showAlert('很抱歉,您的提交存在错误。请确保所有必
填字段都已填写正确,然后再试一次。');
+          $(form).removeClass('disabled');
+        }
+      });
+
+      return false;
+    });
+
+    function showAlert(message) {
+      $('.page__comments-form .js-notice').removeClass('hidden');
+      $('.page__comments-form .js-notice-text').html(message);
+    }
+  })(jQuery);
+  </script>
+
+
+
+
+
+
+
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/08e1b43f/content/cn/docs/performance-test-on-seckill-with-jmeter/index.html
----------------------------------------------------------------------
diff --git a/content/cn/docs/performance-test-on-seckill-with-jmeter/index.html 
b/content/cn/docs/performance-test-on-seckill-with-jmeter/index.html
new file mode 100644
index 0000000..453dc01
--- /dev/null
+++ b/content/cn/docs/performance-test-on-seckill-with-jmeter/index.html
@@ -0,0 +1,886 @@
+<!doctype html>
+<!--
+  Minimal Mistakes Jekyll Theme 4.4.1 by Michael Rose
+  Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
+  Free for personal and commercial use under the MIT license
+  https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt
+-->
+<html lang="cn" class="no-js">
+  <head>
+    <meta charset="utf-8">
+
+<!-- begin SEO -->
+
+
+
+
+
+
+
+
+
+<title>使用JMeter对秒杀示例进行性能测试 - Apache incubator 
ServiceComb</title>
+
+
+
+
+<meta name="description" 
content="介绍如何使用JMeter进行性能测试以及获取秒杀示例的性能基线">
+
+
+
+
+<meta name="author" content="Yangyong Zheng">
+
+<meta property="og:locale" content="cn">
+<meta property="og:site_name" content="Apache incubator ServiceComb">
+<meta property="og:title" 
content="使用JMeter对秒杀示例进行性能测试">
+
+
+  <link rel="canonical" 
href="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/docs/performance-test-on-seckill-with-jmeter/";>
+  <meta property="og:url" 
content="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/docs/performance-test-on-seckill-with-jmeter/";>
+
+
+
+  <meta property="og:description" 
content="介绍如何使用JMeter进行性能测试以及获取秒杀示例的性能基线">
+
+
+
+  <meta name="twitter:site" content="@ServiceComb">
+  <meta name="twitter:title" 
content="使用JMeter对秒杀示例进行性能测试">
+  <meta name="twitter:description" 
content="介绍如何使用JMeter进行性能测试以及获取秒杀示例的性能基线">
+  <meta name="twitter:url" content="">
+
+  
+    <meta name="twitter:card" content="summary">
+    
+  
+
+  
+    <meta name="twitter:creator" content="@">
+  
+
+
+
+  
+
+  
+
+
+
+
+
+  <meta property="og:type" content="article">
+  <meta property="article:published_time" content="2017-09-15T00:00:00+08:00">
+
+
+
+
+
+
+
+
+  <script type="application/ld+json">
+    {
+      "@context" : "http://schema.org";,
+      "@type" : "Person",
+      "name" : "Apache incubator ServiceComb",
+      "url" : "http://github.com/pages/ServiceComb/servicesomb.github.io";,
+      "sameAs" : null
+    }
+  </script>
+
+
+
+  <meta name="google-site-verification" 
content="HvJjNd7vvJ-yjSTHlBiIWEYxp_Hrz-PYEY5Idz9LRcA" />
+
+
+
+
+<!-- end SEO -->
+
+
+<link href="/feed.xml" type="application/atom+xml" rel="alternate" 
title="Apache incubator ServiceComb Feed">
+
+<!-- http://t.co/dKP3o1e -->
+<meta name="HandheldFriendly" content="True">
+<meta name="MobileOptimized" content="320">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<script>
+  document.documentElement.className = 
document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
+</script>
+<script 
src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js";></script>
+<script src="/assets/js/prism.js"></script>
+
+<script type="text/javascript" async
+  
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML";>
+</script>
+
+<link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css";
 
integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
 crossorigin="anonymous">
+
+<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"; 
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
 crossorigin="anonymous"></script>
+<script 
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"; 
integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
 crossorigin="anonymous"></script>
+<script 
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"; 
integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
 crossorigin="anonymous"></script>
+<!-- For all browsers -->
+<link rel="stylesheet" href="/assets/css/main.css">
+<link rel="stylesheet" href="/assets/css/prism.css">
+
+<!--[if lte IE 9]>
+  <style>
+    /* old IE unsupported flexbox fixes */
+    .greedy-nav .site-title {
+      padding-right: 3em;
+    }
+    .greedy-nav button {
+      position: absolute;
+      top: 0;
+      right: 0;
+      height: 100%;
+    }
+  </style>
+<![endif]-->
+
+<meta http-equiv="cleartype" content="on">
+
+    <!-- start custom head snippets -->
+
+<!-- insert favicons. use http://realfavicongenerator.net/ -->
+<link 
href="https://fonts.cat.net/css?family=Roboto:400,500,700|Source+Code+Pro" 
rel="stylesheet">
+<script src="/assets/js/custom.js"></script>
+<!-- end custom head snippets -->
+
+  </head>
+
+  <body class="layout--single">
+
+    <!--[if lt IE 9]>
+<div class="notice--danger align-center" style="margin: 0;">You are using an 
<strong>outdated</strong> browser. Please <a 
href="http://browsehappy.com/";>upgrade your browser</a> to improve your 
experience.</div>
+<![endif]-->
+    <div class="masthead">
+  <div class="masthead__inner-wrap">
+    <div class="masthead__menu">
+      <nav id="site-nav" class="greedy-nav">
+             
+          <a class="site-title active" href="/cn"><img 
src="//assets/images/ServiceComb-logo-1.png"></a>
+             
+        <ul class="visible-links">
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/docs/quick-start/">快速入门</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/users/">用户手册</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/developers/">开发者手册</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/year-archive/">博文</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/faqs/">常见问题</a>
+              
+            </li>
+          
+        </ul>
+        <button><div class="navicon"></div></button>
+        <ul class="hidden-links hidden"></ul>
+        <div class="nav-lang">
+          
+            
+            
+            <a href=/docs/performance-test-on-seckill-with-jmeter/>English</a>
+          
+        </div>
+      </nav>
+    </div>
+  </div>
+</div>
+
+
+    
+
+
+
+<div id="main" role="main">
+  
+  <div class="sidebar sticky">
+      
+      <div class="back-to-home">首页 > <a href="/cn/">ServiceComb</a></div>
+      
+  
+
+<div itemscope itemtype="http://schema.org/Person";>
+
+  
+
+  <div class="author__content">
+    <h3 class="author__name" itemprop="name">Yangyong Zheng</h3>
+    
+      <p class="author__bio" itemprop="description">
+           
+             
+               Fast Action, do not ask
+             
+           
+      </p>
+    
+  </div>
+
+  <div class="author__urls-wrapper">
+    <button class="btn btn--inverse">关注</button>
+    <ul class="author__urls social-icons">
+      
+
+      
+        <li>
+          <a href="https://zhengyangyong.github.io"; itemprop="url">
+            <i class="fa fa-fw fa-chain" aria-hidden="true"></i> 网站
+          </a>
+        </li>
+      
+
+      
+        <li>
+          <a href="mailto:yangyong.zh...@huawei.com";>
+            <meta itemprop="email" content="yangyong.zh...@huawei.com" />
+            <i class="fa fa-fw fa-envelope-square" aria-hidden="true"></i> 
电子邮箱
+          </a>
+        </li>
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      
+
+      <!--
+  <li>
+    <a href="http://link-to-whatever-social-network.com/user/"; 
itemprop="sameAs">
+      <i class="fa fa-fw" aria-hidden="true"></i> Custom Social Profile Link
+    </a>
+  </li>
+-->
+    </ul>
+  </div>
+</div>
+
+  
+  </div>
+
+
+
+  <article class="page" itemscope itemtype="http://schema.org/CreativeWork";>
+    <meta itemprop="headline" 
content="使用JMeter对秒杀示例进行性能测试">
+    <meta itemprop="description" 
content="介绍如何使用JMeter进行性能测试以及获取秒杀示例的性能基线">
+    <meta itemprop="datePublished" content="September 15, 2017">
+    <meta itemprop="dateModified" content="September 15, 2017">
+
+    <div class="page__inner-wrap">
+      
+        
+          <header>
+            <h1 class="page__title" 
itemprop="headline">使用JMeter对秒杀示例进行性能测试
+</h1>
+            
+              <p class="page__meta"><i class="fa fa-clock-o" 
aria-hidden="true"></i> 
+
+
+
+
+  少于 1 分钟 阅读
+
+</p>
+            
+          </header>
+        
+      
+
+      <section class="page__content" itemprop="text">
+        <h2 id="背景">背景</h2>
+<p>  <a 
href="https://github.com/ServiceComb/seckill";>秒杀</a>是我们ServiceComb开源团队以领域驱动设计(<a
 
href="https://en.wikipedia.org/wiki/Domain-driven_design";>DDD</a>)为背景,从零开始构建一个微服务架构的示例项目;在《秒杀开发历程》系列博文中提到它作为一个高并发压力场景的应用,采用了<a
 
href="https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs";>CQRS</a>模式构建,å›
 æ­¤æˆ‘们将使用<a href="http://jmeter.apache.org/";>JMeter</a>来对å…
¶è¿›è¡Œæ€§èƒ½è¯„估。</p>
+
+<h2 id="制定用户行为模型">制定用户行为模型</h2>
+<p>  因
为秒杀的场景在现实生活中非常常见,所以用户行为模型非常容易设计:</p>
+<ol>
+  
<li>客户不停的刷秒杀活动,直到刷出一个正在进行的秒杀活动;</li>
+  <li>刷出了秒杀活动后,马上请求秒杀优惠券;</li>
+  <li>无
论是否成功,客户会稍后查询一次自己已经拥有的优惠
券确定优惠券是否进入自己的账号。</li>
+</ol>
+
+<p>  我们还需要一个管理员用户,隔一段时间就创建发布秒杀活动,当然活动åŒ
…含的优惠券数量将会远少于客户的数量。
+  
+  用户行为模型在JMeter中体现为脚本逻辑,完成的脚本逻辑如下:</p>
+
+<p><img 
src="/assets/images/performance-test-on-seckill-with-jmeter-script.png" 
alt="图1 脚本模型" class="align-center" /></p>
+
+<p>  脚本文件已经托管至秒杀项目中,可直接获取:</p>
+
+<div class="language-bash highlighter-rouge"><pre class="highlight"><code>git 
clone https://github.com/ServiceComb/seckill
+<span class="nb">cd </span>seckill/performance-test/script
+</code></pre>
+</div>
+
+<h2 id="性能测试环境">性能测试环境</h2>
+<p>  我们调来了两台云服务器进行性能测试,角色和é…
ç½®å¦‚下:</p>
+<h3 id="秒杀服务器配置">秒杀服务器配置</h3>
+<p>  承载秒杀示例所有的微服务和中间件,包
括四个微服务(Admin、Command、Event和Query)、两个数据库(ReadDB和WriteDB)和一个Message
 Broker(ActiveMQ)。</p>
+
+<table>
+  <thead>
+    <tr>
+      <th>配置项</th>
+      <th>配置值</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>CPU</td>
+      <td>Intel Xeon E5-2690 3.0GHz * 16</td>
+    </tr>
+    <tr>
+      <td>MEM</td>
+      <td>64GB</td>
+    </tr>
+    <tr>
+      <td>OS</td>
+      <td>Ubuntu 16.04.2 LTS</td>
+    </tr>
+  </tbody>
+</table>
+
+<p>  为了能够便于é…
ç½®å’Œå¯åŠ¨ç¤ºä¾‹ç³»ç»Ÿï¼Œæˆ‘们采用《秒杀开发历程(三)》中的一键启动模式拉起所有的服务,å›
 æ­¤Docker升级为当前最新版17.06.2-ce,能够支持é…
ç½®Container使用CPU和内存的大小限制,以Admin微服务为例:
+  </p>
+<div class="language-yaml highlighter-rouge"><pre class="highlight"><code>  
<span class="s">admin-service</span><span class="pi">:</span>
+    <span class="s">mem_limit</span><span class="pi">:</span> <span 
class="s">4096m</span>
+    <span class="s">cpu_count</span><span class="pi">:</span> <span 
class="s">4</span>
+    <span class="s">cpu_percent</span><span class="pi">:</span> <span 
class="s">50</span>
+    <span class="s">image</span><span class="pi">:</span> <span 
class="s2">"</span><span class="s">seckill-admin-service:0.2.0-SNAPSHOT"</span>
+    <span class="s">hostname</span><span class="pi">:</span> <span 
class="s">admin-service</span>
+    <span class="s">links</span><span class="pi">:</span>
+      <span class="pi">-</span> <span class="s2">"</span><span 
class="s">mysql-write-db:write_db.servicecomb.io"</span>
+    <span class="s">environment</span><span class="pi">:</span>
+      <span class="pi">-</span> <span 
class="s">JAVA_OPTS=-Dspring.profiles.active=prd 
-Dendpoints.shutdown.enabled=true</span>
+    <span class="s">ports</span><span class="pi">:</span>
+      <span class="pi">-</span> <span class="s2">"</span><span 
class="s">8081:8081"</span>
+</code></pre>
+</div>
+
+<h3 id="加压机配置">加压机配置</h3>
+<p>  加压机与秒杀服务器处于同一网络环境中,é…
ç½®å¦‚下:
+  
+| 配置项  | 配置值                            |
+| —- | —————————— |
+| CPU  | Intel Xeon E5-2690 3.0GHz * 16 |
+| MEM  | 32GB                           |
+| OS   | Ubuntu 16.04.2 LTS             |</p>
+
+<h2 id="启动测试">启动测试</h2>
+<p>  我们设定测试场景为200客户,每隔1秒启动一个新客户;1个管理员每隔10秒发布1个秒杀活动,一å
…±å‘布160次,每个秒杀活动包含50张优惠券,即一共投放8000å¼ 
优惠券。整个测试持续半个小时。
+  
+  现在,我们切换到性能测试脚本目录下,执行下面的命令启动测试:
+  </p>
+<div class="language-bash highlighter-rouge"><pre 
class="highlight"><code>jmeter -n -t seckill.jmx -l log.jtl
+</code></pre>
+</div>
+
+<h2 id="测试结果">测试结果</h2>
+<p>  测试完毕后通过下面的命令分析测试结果日志数据,请将<report
 folder="">替换为你的本地目录:</report></p>
+
+<div class="language-bash highlighter-rouge"><pre 
class="highlight"><code>jmeter -g log.jtl -o &lt;report folder&gt;
+</code></pre>
+</div>
+
+<p>  我们需要å…
ˆéªŒè¯æµ‹è¯•ç»“果的正确性,查看数据统计图:</p>
+
+<p><img 
src="/assets/images/performance-test-on-seckill-with-jmeter-statistics.png" 
alt="图2 事务统计" class="align-center" /></p>
+
+<p>  其中秒杀的失败率在96.45%,原因
是Query对于活动的秒杀活动采用的是0.5秒刷新缓存的策略,在活动中的优æƒ
 åˆ¸è¢«ç§’杀一空下架前,短暂的时间内
仍然能够查询到这个活动;架构中采用的<a 
href="https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs";>CQRS</a>模式只能保证最终一致性,并不能保证实时一致性。
+  
+  成功秒杀的次数为225264 - 217264 = 
8000,正好等于我们设定的优惠券投放量,å…
¶ä»–事务的失败率均为0%,因此测试结果正确。</p>
+
+<h3 id="吞吐能力">吞吐能力</h3>
+<p>  秒杀整体吞吐能力如下图:</p>
+
+<p><img 
src="/assets/images/performance-test-on-seckill-with-jmeter-tps-all.png" 
alt="图3 整体吞吐能力" class="align-center" /></p>
+
+<p>  可以看到查询活跃的秒杀活动(刷券)事务处理量最高,稳定在4000左右,å
…¶ä»–因为业务比例的原因
较低,去掉查询活跃的秒杀活动事务后如下图:</p>
+
+<p><img 
src="/assets/images/performance-test-on-seckill-with-jmeter-tps-less.png" 
alt="图4 秒杀和优惠券查询" class="align-center" /></p>
+
+<p>  秒杀和优惠券查询之间的差值是由于存在秒杀失败造
成的,我们的用户行为模型是无
论秒杀成功与否都会进行一次优惠券查询。</p>
+
+<h3 id="响应时间">响应时间</h3>
+<p>  事务的响应时间我们可以看下面两个图:</p>
+
+<p><img 
src="/assets/images/performance-test-on-seckill-with-jmeter-latencies.png" 
alt="图5 响应时间" class="align-center" /></p>
+
+<p><img 
src="/assets/images/performance-test-on-seckill-with-jmeter-time-percentiles.png"
 alt="图6 响应时间分布" class="align-center" /></p>
+
+<p>  75%的事务处理时间都在10ms以下,整体平均响应时间处于50ms以下。</p>
+
+<h2 id="瓶颈分析">瓶颈分析</h2>
+<p>  依据执行过程中对于测试资源的观察,加
压机CPU使用率基本已满(200线程并发),服务器CPU使用率低于20%,å
…¶ä»–资源使用率很低。</p>
+
+<h2 id="总结">总结</h2>
+<p>  通过这次性能测试,我们得知秒杀示例在使用一台普通服务器é
…
ç½®èƒ½å¤Ÿè¾¾åˆ°æ€»ä½“5000以上的TPS还能够保持较低的资源使用率,表现出良好的性能;未来我们会将秒杀示例部署在K8S群集中并é
…ç½®å¼¹æ€§ä¼¸ç¼©è¿›è¡ŒåŽ‹åŠ›æµ‹è¯•ï¼Œæ‚¨å¯ä»¥é˜…读我们<a 
href="http://servicecomb.io/cn/docs/stress-test-on-company-with-jmeter-in-k8s/";>《在Kubernetes集群中使用JMeter对Company示例进行压力测试》</a>这篇文ç«
 å±•æœ›ã€‚</p>
+
+        
+      </section>
+
+      <footer class="page__meta">
+        
+        
+  
+
+
+  
+  
+  
+
+  <p class="page__taxonomy">
+    <strong><i class="fa fa-fw fa-tags" aria-hidden="true"></i> 标签: 
</strong>
+    <span itemprop="keywords">
+    
+      
+      
+      <a href="/tags/#seckill" class="page__taxonomy-item" 
rel="tag">seckill</a><span class="sep">, </span>
+    
+      
+      
+      <a href="/tags/#%E5%8E%8B%E5%8A%9B%E6%B5%8B%E8%AF%95" 
class="page__taxonomy-item" rel="tag">压力测试</a>
+    
+    </span>
+  </p>
+
+
+
+
+
+        
+          
+            
+              <p class="page__date"><strong><i class="fa fa-fw fa-calendar" 
aria-hidden="true"></i> 最新的:</strong> <time 
datetime="2017-09-15">2017年9月15日</time></p>
+            
+          
+        
+      </footer>
+
+      <section class="page__share">
+  
+    <h4 class="page__share-title">分享</h4>
+  
+
+  <a 
href="https://twitter.com/intent/tweet?via=ServiceComb&text=使用JMeter对秒杀示例进行性能测试
 /cn/docs/performance-test-on-seckill-with-jmeter/" class="btn btn--twitter" 
title="分享 Twitter"><i class="fa fa-fw fa-twitter" 
aria-hidden="true"></i><span> Twitter</span></a>
+
+  <a 
href="https://www.facebook.com/sharer/sharer.php?u=/cn/docs/performance-test-on-seckill-with-jmeter/";
 class="btn btn--facebook" title="分享 Facebook"><i class="fa fa-fw 
fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
+
+  <a 
href="https://plus.google.com/share?url=/cn/docs/performance-test-on-seckill-with-jmeter/";
 class="btn btn--google-plus" title="分享 Google Plus"><i class="fa fa-fw 
fa-google-plus" aria-hidden="true"></i><span> Google+</span></a>
+
+  <a 
href="https://www.linkedin.com/shareArticle?mini=true&url=/cn/docs/performance-test-on-seckill-with-jmeter/";
 class="btn btn--linkedin" title="分享 LinkedIn"><i class="fa fa-fw 
fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
+</section>
+
+
+      
+  <nav class="pagination">
+    
+      <a href="/cn/docs/maven_dependency_management/" 
class="pagination--pager" title="使用maven管理复杂依赖关系的技巧
+">向前</a>
+    
+    
+      <a href="/docs/distributed_saga_2/" class="pagination--pager" 
title="Eventual Data Consistency Solution in ServiceComb - part 2
+">向后</a>
+    
+  </nav>
+
+
+    </div>
+
+    
+      <div class="page__comments">
+  
+  
+    <section id="static-comments">
+      
+        <!-- Start static comments -->
+        <div class="js-comments">
+          
+        </div>
+        <!-- End static comments -->
+
+        <!-- Start new comment form -->
+        <h4 class="page__comments-title">留下评论</h4>
+        <p 
class="small">您的电子邮箱地址并不会被展示。请填写标记为必
须的字段。 <span class="required">*</span></p>
+        <form id="new_comment" class="page__comments-form js-form form" 
method="post" 
action="https://api.staticman.net/v1/entry/ServiceComb/servicesomb.github.io/master";>
+          <div class="form__spinner">
+            <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
+            <span class="sr-only">正在加载...</span>
+          </div>
+
+          <fieldset>
+            <label for="comment-form-message">评论 <small 
class="required">*</small></label>
+            <textarea type="text" rows="3" id="comment-form-message" 
name="fields[message]" tabindex="1"></textarea>
+            <div class="small help-block"><a 
href="https://daringfireball.net/projects/markdown/";>Markdown语法已支持。</a></div>
+          </fieldset>
+          <fieldset>
+            <label for="comment-form-name">姓名 <small 
class="required">*</small></label>
+            <input type="text" id="comment-form-name" name="fields[name]" 
tabindex="2" />
+          </fieldset>
+          <fieldset>
+            <label for="comment-form-email">电子邮箱 <small 
class="required">*</small></label>
+            <input type="email" id="comment-form-email" name="fields[email]" 
tabindex="3" />
+          </fieldset>
+          <fieldset>
+            <label for="comment-form-url">网站(可选)</label>
+            <input type="url" id="comment-form-url" name="fields[url]" 
tabindex="4"/>
+          </fieldset>
+          <fieldset class="hidden" style="display: none;">
+            <input type="hidden" name="options[slug]" 
value="performance-test-on-seckill-with-jmeter">
+            <label for="comment-form-location">Not used. Leave blank if you 
are a human.</label>
+            <input type="text" id="comment-form-location" 
name="fields[hidden]" autocomplete="off"/>
+          </fieldset>
+          <!-- Start comment form alert messaging -->
+          <p class="hidden js-notice">
+            <strong class="js-notice-text"></strong>
+          </p>
+          <!-- End comment form alert messaging -->
+          <fieldset>
+            <button type="submit" id="comment-form-submit" tabindex="5" 
class="btn btn--large">提交评论</button>
+          </fieldset>
+        </form>
+        <!-- End new comment form -->
+      
+    </section>
+  
+</div>
+
+    
+  </article>
+
+  
+  
+    <div class="page__related">
+      <h4 class="page__related-title">猜您还喜欢</h4>
+      <div class="grid__wrapper">
+        
+          
+
+
+
+<div class="grid__item">
+  <article class="archive__item" itemscope 
itemtype="http://schema.org/CreativeWork";>
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/cn/docs/jira_beginner_guide/" rel="permalink">老司机带你
刷任务 - ServiceComb JIRA入门指南
+</a>
+      
+    </h2>
+    <p class="archive__item-excerpt" itemprop="description">ServiceComb JIRAå…
¥é—¨æŒ‡å—
+</p>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  少于 1 分钟 阅读
+
+</p>
+    
+  </article>
+</div>
+
+        
+          
+
+
+
+<div class="grid__item">
+  <article class="archive__item" itemscope 
itemtype="http://schema.org/CreativeWork";>
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/docs/service-center-ui/" rel="permalink">Service-Center 
Management UI Console
+</a>
+      
+    </h2>
+    <p class="archive__item-excerpt" itemprop="description">An introduction 
Service-Center Management Console
+</p>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  2 分钟 阅读
+
+</p>
+    
+  </article>
+</div>
+
+        
+          
+
+
+
+<div class="grid__item">
+  <article class="archive__item" itemscope 
itemtype="http://schema.org/CreativeWork";>
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/docs/service-center-ui/" rel="permalink">Service-Center 
Management UI Console
+</a>
+      
+    </h2>
+    <p class="archive__item-excerpt" itemprop="description">An introduction 
Service-Center Management Console
+</p>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  2 分钟 阅读
+
+</p>
+    
+  </article>
+</div>
+
+        
+          
+
+
+
+<div class="grid__item">
+  <article class="archive__item" itemscope 
itemtype="http://schema.org/CreativeWork";>
+    
+    <h2 class="archive__item-title" itemprop="headline">
+      
+        <a href="/cn/docs/how-to-reform-a-legacy-system/" 
rel="permalink">最头疼的遗留系统该如何改造?
+</a>
+      
+    </h2>
+    <p class="archive__item-excerpt" 
itemprop="description">微服务是否是业界期待已久
的企业架构解决方案?在对遗留系统进行微服务的改造
过程中存在怎样的困难和挑战,应该注意些什么?
+</p>
+    
+      <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> 
+
+
+
+
+  1 分钟 阅读
+
+</p>
+    
+  </article>
+</div>
+
+        
+      </div>
+    </div>
+  
+</div>
+
+
+    <script async 
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+    <div align="center" style="margin: 0 0;">
+    <ins class="adsbygoogle"
+         style="display:block; border-bottom: initial;"
+         data-ad-client="ca-pub-7328585512091257"
+         data-ad-slot="3049671934"
+         data-ad-format="auto"></ins>
+    </div>
+
+    <div class="page__footer">
+      <footer>
+        <!-- start custom footer snippets -->
+
+<!-- end custom footer snippets -->
+        <div class="container">
+  <div class="row justify-content-md-center">
+    
+    <div class="col">
+      <ul>
+        <p class="header">资源</p>
+        <li><a href="/cn/docs/quick-start/">快速入门</a></li>
+        <li><a href="/cn/users/user-guide/">用户指南</a></li>
+        <li><a href="/cn/slides/">资料</a></li>
+        <li><a href="/cn/users/faq/">常见问题</a></li>
+      </ul>
+    </div>
+    <div class="col">
+      <ul>
+        <p class="header">贡献</p>
+        <li><a 
href="https://github.com/ServiceComb/ServiceComb.github.io/issues/new?title=Issue
 with 
_posts/cn/2017-09-15-performance-test-on-seckill-with-jmeter.md">报告本网页问题</a></li>
+        <li><a 
href="https://github.com/ServiceComb/ServiceComb.github.io/edit/master/_posts/cn/2017-09-15-performance-test-on-seckill-with-jmeter.md";>在Github上编辑此页</a></li>
+        <li><a href="/cn/developers/submit-codes/">代码提交指南</a></li>
+      </ul>
+    </div>
+    <div class="col">
+      <ul class="social-icons">
+        <p class="header">社区</p>
+        <li>
+            <a 
href="https://groups.google.com/forum/#!forum/servicecomb-developers"; 
target="_blank"><span class="group">开发者</span></a> |
+            <a 
href="https://groups.google.com/forum/#!forum/servicecomb-users"; 
target="_blank">用户</span></a>
+        </li>
+        <li>
+            <a href="http://github.com/ServiceComb"; target="_blank"><span 
class="github">Github</span></a>
+        </li>
+        <li>
+            <a href="https://twitter.com/ServiceComb"; target="_blank"><span 
class="twitter">Twitter</span></a>
+        </li>
+        <li>
+            <a href="/feed.xml" target="_blank"><span 
class="rss">Feed</span></a>
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<div class="page__footer-bottom">
+  <div>&copy; 2017 Apache incubator ServiceComb. 技术来自于 <a 
href="http://jekyllrb.com"; rel="nofollow">Jekyll</a> &amp; <a 
href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/"; 
rel="nofollow">Minimal Mistakes</a>.</div>
+</div>
+
+      </footer>
+    </div>
+
+    <script src="/assets/js/main.min.js"></script>
+
+
+
+
+  <script>
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+  ga('create', 'UA-101622733-1', 'auto');
+  ga('send', 'pageview');
+</script>
+
+
+
+
+
+
+
+  
+  <script>
+    (function ($) {
+    var $comments = $('.js-comments');
+
+    $('#new_comment').submit(function () {
+      var form = this;
+
+      $(form).addClass('disabled');
+      $('#comment-form-submit').html('<i class="fa fa-spinner fa-spin 
fa-fw"></i> 正在加载...');
+
+      $.ajax({
+        type: $(this).attr('method'),
+        url: $(this).attr('action'),
+        data: $(this).serialize(),
+        contentType: 'application/x-www-form-urlencoded',
+        success: function (data) {
+          $('#comment-form-submit').html('已提交');
+          $('.page__comments-form .js-notice').removeClass('notice--danger');
+          $('.page__comments-form .js-notice').addClass('notice--success');
+          
showAlert('感谢您的评论!被批准后它会立即在此站点展示。');
+        },
+        error: function (err) {
+          console.log(err);
+          $('#comment-form-submit').html('提交评论');
+          $('.page__comments-form .js-notice').removeClass('notice--success');
+          $('.page__comments-form .js-notice').addClass('notice--danger');
+          showAlert('很抱歉,您的提交存在错误。请确保所有必
填字段都已填写正确,然后再试一次。');
+          $(form).removeClass('disabled');
+        }
+      });
+
+      return false;
+    });
+
+    function showAlert(message) {
+      $('.page__comments-form .js-notice').removeClass('hidden');
+      $('.page__comments-form .js-notice-text').html(message);
+    }
+  })(jQuery);
+  </script>
+
+
+
+
+
+
+
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/08e1b43f/content/cn/docs/quick-start-advance/distributed-tracing/index.html
----------------------------------------------------------------------
diff --git a/content/cn/docs/quick-start-advance/distributed-tracing/index.html 
b/content/cn/docs/quick-start-advance/distributed-tracing/index.html
new file mode 100644
index 0000000..78414fc
--- /dev/null
+++ b/content/cn/docs/quick-start-advance/distributed-tracing/index.html
@@ -0,0 +1,576 @@
+<!doctype html>
+<!--
+  Minimal Mistakes Jekyll Theme 4.4.1 by Michael Rose
+  Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
+  Free for personal and commercial use under the MIT license
+  https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt
+-->
+<html lang="cn" class="no-js">
+  <head>
+    <meta charset="utf-8">
+
+<!-- begin SEO -->
+
+
+
+
+
+
+
+
+
+<title>分布式调用链追踪 - Apache incubator ServiceComb</title>
+
+
+
+
+<meta name="description" 
content="介绍如何在体质指数应用中使用ServiceComb提供的分布式追踪能力">
+
+
+
+
+<meta name="author" content="">
+
+<meta property="og:locale" content="cn">
+<meta property="og:site_name" content="Apache incubator ServiceComb">
+<meta property="og:title" content="分布式调用链追踪">
+
+
+  <link rel="canonical" 
href="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/docs/quick-start-advance/distributed-tracing/";>
+  <meta property="og:url" 
content="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/docs/quick-start-advance/distributed-tracing/";>
+
+
+
+  <meta property="og:description" 
content="介绍如何在体质指数应用中使用ServiceComb提供的分布式追踪能力">
+
+
+
+  <meta name="twitter:site" content="@ServiceComb">
+  <meta name="twitter:title" content="分布式调用链追踪">
+  <meta name="twitter:description" 
content="介绍如何在体质指数应用中使用ServiceComb提供的分布式追踪能力">
+  <meta name="twitter:url" content="">
+
+  
+    <meta name="twitter:card" content="summary">
+    
+  
+
+  
+
+
+
+  
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+  <script type="application/ld+json">
+    {
+      "@context" : "http://schema.org";,
+      "@type" : "Person",
+      "name" : "Apache incubator ServiceComb",
+      "url" : "http://github.com/pages/ServiceComb/servicesomb.github.io";,
+      "sameAs" : null
+    }
+  </script>
+
+
+
+  <meta name="google-site-verification" 
content="HvJjNd7vvJ-yjSTHlBiIWEYxp_Hrz-PYEY5Idz9LRcA" />
+
+
+
+
+<!-- end SEO -->
+
+
+<link href="/feed.xml" type="application/atom+xml" rel="alternate" 
title="Apache incubator ServiceComb Feed">
+
+<!-- http://t.co/dKP3o1e -->
+<meta name="HandheldFriendly" content="True">
+<meta name="MobileOptimized" content="320">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<script>
+  document.documentElement.className = 
document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
+</script>
+<script 
src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js";></script>
+<script src="/assets/js/prism.js"></script>
+
+<script type="text/javascript" async
+  
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML";>
+</script>
+
+<link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css";
 
integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
 crossorigin="anonymous">
+
+<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"; 
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
 crossorigin="anonymous"></script>
+<script 
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"; 
integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
 crossorigin="anonymous"></script>
+<script 
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"; 
integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
 crossorigin="anonymous"></script>
+<!-- For all browsers -->
+<link rel="stylesheet" href="/assets/css/main.css">
+<link rel="stylesheet" href="/assets/css/prism.css">
+
+<!--[if lte IE 9]>
+  <style>
+    /* old IE unsupported flexbox fixes */
+    .greedy-nav .site-title {
+      padding-right: 3em;
+    }
+    .greedy-nav button {
+      position: absolute;
+      top: 0;
+      right: 0;
+      height: 100%;
+    }
+  </style>
+<![endif]-->
+
+<meta http-equiv="cleartype" content="on">
+
+    <!-- start custom head snippets -->
+
+<!-- insert favicons. use http://realfavicongenerator.net/ -->
+<link 
href="https://fonts.cat.net/css?family=Roboto:400,500,700|Source+Code+Pro" 
rel="stylesheet">
+<script src="/assets/js/custom.js"></script>
+<!-- end custom head snippets -->
+
+  </head>
+
+  <body class="layout--single">
+
+    <!--[if lt IE 9]>
+<div class="notice--danger align-center" style="margin: 0;">You are using an 
<strong>outdated</strong> browser. Please <a 
href="http://browsehappy.com/";>upgrade your browser</a> to improve your 
experience.</div>
+<![endif]-->
+    <div class="masthead">
+  <div class="masthead__inner-wrap">
+    <div class="masthead__menu">
+      <nav id="site-nav" class="greedy-nav">
+             
+          <a class="site-title active" href="/cn"><img 
src="//assets/images/ServiceComb-logo-1.png"></a>
+             
+        <ul class="visible-links">
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a class="active" href="/cn/docs/quick-start/">快速入门</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/users/">用户手册</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/developers/">开发者手册</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/year-archive/">博文</a>
+              
+            </li>
+          
+            
+            <li class="masthead__menu-item">
+              
+              
+              
+                <a href="/cn/faqs/">常见问题</a>
+              
+            </li>
+          
+        </ul>
+        <button><div class="navicon"></div></button>
+        <ul class="hidden-links hidden"></ul>
+        <div class="nav-lang">
+          
+            
+            
+            <a href=/docs/quick-start-advance/distributed-tracing/>English</a>
+          
+        </div>
+      </nav>
+    </div>
+  </div>
+</div>
+
+
+    
+
+
+
+<div id="main" role="main">
+  
+  <div class="sidebar sticky">
+      
+      <div class="back-to-home">首页 > <a href="/cn/">ServiceComb</a></div>
+      
+  
+  
+    
+      
+      
+      
+    
+    
+      
+
+<nav class="nav__list">
+  
+  <input id="ac-toc" name="accordion-toc" type="checkbox" />
+  <label for="ac-toc">切换菜单</label>
+  <ul class="nav__items">
+    
+      <li>
+        
+          
+          
+
+          <a href="/cn/docs/quick-start/"><span class="nav__sub-title 
nav__sub-title-with-url">快速入门</span></a>
+        
+
+        
+      </li>
+    
+      <li>
+        
+          
+          
+
+          <a href="/cn/docs/quick-start-bmi/"><span class="nav__sub-title 
nav__sub-title-with-url">微服务应用快速开发</span></a>
+        
+
+        
+      </li>
+    
+      <li>
+        
+          
+          
+
+          <a href="/cn/docs/quick-start-advance/"><span class="nav__sub-title 
nav__sub-title-with-url">微服务开发进阶</span></a>
+        
+
+        
+        <ul>
+          
+            
+            
+
+            
+            
+
+            <li><a href="/cn/docs/quick-start-advance/load-balance/" 
class="">负载均衡</a></li>
+          
+            
+            
+
+            
+            
+
+            <li><a href="/cn/docs/quick-start-advance/flow-control/" 
class="">流量控制</a></li>
+          
+            
+            
+
+            
+            
+
+            <li><a href="/cn/docs/quick-start-advance/service-management/" 
class="">服务治理</a></li>
+          
+            
+            
+
+            
+            
+
+            <li><a href="/cn/docs/quick-start-advance/distributed-tracing/" 
class="active">分布式调用链追踪</a></li>
+          
+        </ul>
+        
+      </li>
+    
+      <li>
+        
+          
+          
+
+          <a href="/cn/docs/quick-start-dataconsistency/"><span 
class="nav__sub-title 
nav__sub-title-with-url">数据一致性解决方案</span></a>
+        
+
+        
+      </li>
+    
+  </ul>
+</nav>
+
+    
+  
+  </div>
+
+
+
+  <article class="page" itemscope itemtype="http://schema.org/CreativeWork";>
+    <meta itemprop="headline" content="分布式调用链追踪">
+    <meta itemprop="description" 
content="介绍如何在体质指数应用中使用ServiceComb提供的分布式追踪能力">
+    
+    <meta itemprop="dateModified" content="September 03, 2017">
+
+    <div class="page__inner-wrap">
+      
+        
+          <header>
+            <h1 class="page__title" 
itemprop="headline">分布式调用链追踪
+</h1>
+            
+          </header>
+        
+      
+
+      <section class="page__content" itemprop="text">
+        <aside class="sidebar__right">
+<nav class="toc">
+    <!-- <header><h4 class="nav__title"><i class="fa fa-file-text"></i> 
在本页上</h4></header> -->
+<ul class="toc__menu" id="markdown-toc">
+  <li><a href="#前言" id="markdown-toc-前言">前言</a></li>
+  <li><a href="#启用" id="markdown-toc-启用">启用</a></li>
+  <li><a href="#验证" id="markdown-toc-验证">验证</a></li>
+  <li><a href="#下一步" id="markdown-toc-下一步">下一步</a></li>
+</ul>
+
+  </nav>
+</aside>
+
+<p>分布式调用链追踪用于有效地监控微服务的网络延时并可视化微服务中的数据流转。本指南将展示如何在
 <em>体质指数</em> 应用中使用 <strong>ServiceComb</strong> 
提供的分布式调用链追踪能力。</p>
+
+<h2 id="前言">前言</h2>
+
+<p>在您进一步阅读之前,请确保您已阅读了<a 
href="/cn/docs/quick-start-bmi/">微服务应用快速开发指南</a>,并已成功运行体质指数微服务。</p>
+
+<h2 id="启用">启用</h2>
+
+<ol>
+  <li>
+    <p>在 <em>体质指数计算器</em> 的 <code 
class="highlighter-rouge">pom.xml</code> 文件中添加依赖项:</p>
+
+    <div class="language-xml highlighter-rouge"><pre class="highlight"><code>  
  <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>io.servicecomb<span 
class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>handler-tracing-zipkin<span 
class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+    </div>
+  </li>
+  <li>
+    <p>在 <em>体质指数计算器</em> 的 <code 
class="highlighter-rouge">microservice.yaml</code> 文件中添加
分布式追踪的处理链:</p>
+
+    <div class="language-yaml highlighter-rouge"><pre 
class="highlight"><code><span class="s">cse</span><span class="pi">:</span>
+  <span class="s">handler</span><span class="pi">:</span>
+    <span class="s">chain</span><span class="pi">:</span>
+      <span class="s">Provider</span><span class="pi">:</span>
+        <span class="s">default</span><span class="pi">:</span> <span 
class="s">tracing-provider</span>
+</code></pre>
+    </div>
+  </li>
+  <li>
+    <p>在 <em>体质指数界面</em> 的 <code 
class="highlighter-rouge">pom.xml</code> 文件中添加依赖项:</p>
+
+    <div class="language-xml highlighter-rouge"><pre class="highlight"><code>  
  <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>io.servicecomb<span 
class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>spring-cloud-zuul-zipkin<span 
class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+    </div>
+  </li>
+</ol>
+
+<p>体质指数应用中已配置好了上述é…
ç½®é¡¹ï¼Œæ‚¨åªéœ€æ‰§è¡Œä»¥ä¸‹å‡ æ­¥å³å¯ï¼š</p>
+
+<ol>
+  <li>
+    <p>使用 Docker 运行 <em>Zipkin</em> 分布式追踪服务:</p>
+
+    <div class="language-bash highlighter-rouge"><pre 
class="highlight"><code>docker run -d -p 9411:9411 openzipkin/zipkin
+</code></pre>
+    </div>
+  </li>
+  <li>
+    <p>重启 <em>体质指数计算器</em> 微服务:</p>
+
+    <div class="language-bash highlighter-rouge"><pre 
class="highlight"><code>mvn spring-boot:run -Drun.jvmArguments<span 
class="o">=</span><span 
class="s2">"-Dcse.handler.chain.Provider.default=tracing-provider"</span>
+</code></pre>
+    </div>
+  </li>
+  <li>
+    <p>重启 <em>体质指数界面</em> 微服务:</p>
+
+    <div class="language-bash highlighter-rouge"><pre 
class="highlight"><code>mvn spring-boot:run -Drun.jvmArguments<span 
class="o">=</span><span class="s2">"-Dservicecomb.tracing.enabled=true"</span>
+</code></pre>
+    </div>
+  </li>
+</ol>
+
+<h2 id="验证">验证</h2>
+
+<ol>
+  <li>
+    <p>访问 <a>http://localhost:8889</a> ,在身高和体重栏处输å…
¥æ­£æ•°ï¼Œå¹¶ç‚¹å‡» <em>Submit</em> 按钮。</p>
+  </li>
+  <li>
+    <p>访问 <a>http://localhost:9411</a> ,查看分布式调用追踪情
况,可得下方界面。</p>
+  </li>
+</ol>
+
+<p><img src="/assets/images/distributed-tracing-result.png" 
alt="分布式追踪效果" class="align-center" /></p>
+
+<h2 id="下一步">下一步</h2>
+
+<ul>
+  <li>
+    <p>了解更多<a 
href="/cn/users/distributed-tracing/">分布式调用链追踪</a></p>
+  </li>
+  <li>
+    <p>阅读<a href="/cn/docs/tracing-with-servicecomb/">基于 ServiceComb 
和 Zipkin 的分布式调用链追踪</a>来进一步了解分布式追踪</p>
+  </li>
+  <li>
+    <p>认识 <a href="/cn/users/"><strong>ServiceComb</strong> 
微服务开发框架</a></p>
+  </li>
+  <li>
+    <p>通过 <a href="/cn/docs/linuxcon-workshop-demo/">Company应用</a> 
更深入地了解微服务开发</p>
+  </li>
+</ul>
+
+        
+      </section>
+
+      <footer class="page__meta">
+        
+        
+
+
+        
+      </footer>
+
+      
+
+      
+
+    </div>
+
+    
+  </article>
+
+  
+  
+</div>
+
+
+    <script async 
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+    <div align="center" style="margin: 0 0;">
+    <ins class="adsbygoogle"
+         style="display:block; border-bottom: initial;"
+         data-ad-client="ca-pub-7328585512091257"
+         data-ad-slot="3049671934"
+         data-ad-format="auto"></ins>
+    </div>
+
+    <div class="page__footer">
+      <footer>
+        <!-- start custom footer snippets -->
+
+<!-- end custom footer snippets -->
+        <div class="container">
+  <div class="row justify-content-md-center">
+    
+    <div class="col">
+      <ul>
+        <p class="header">资源</p>
+        <li><a href="/cn/docs/quick-start/">快速入门</a></li>
+        <li><a href="/cn/users/user-guide/">用户指南</a></li>
+        <li><a href="/cn/slides/">资料</a></li>
+        <li><a href="/cn/users/faq/">常见问题</a></li>
+      </ul>
+    </div>
+    <div class="col">
+      <ul>
+        <p class="header">贡献</p>
+        <li><a 
href="https://github.com/ServiceComb/ServiceComb.github.io/issues/new?title=Issue
 with _docs/cn/distributed-tracing.md">报告本网页问题</a></li>
+        <li><a 
href="https://github.com/ServiceComb/ServiceComb.github.io/edit/master/_docs/cn/distributed-tracing.md";>在Github上编辑此页</a></li>
+        <li><a href="/cn/developers/submit-codes/">代码提交指南</a></li>
+      </ul>
+    </div>
+    <div class="col">
+      <ul class="social-icons">
+        <p class="header">社区</p>
+        <li>
+            <a 
href="https://groups.google.com/forum/#!forum/servicecomb-developers"; 
target="_blank"><span class="group">开发者</span></a> |
+            <a 
href="https://groups.google.com/forum/#!forum/servicecomb-users"; 
target="_blank">用户</span></a>
+        </li>
+        <li>
+            <a href="http://github.com/ServiceComb"; target="_blank"><span 
class="github">Github</span></a>
+        </li>
+        <li>
+            <a href="https://twitter.com/ServiceComb"; target="_blank"><span 
class="twitter">Twitter</span></a>
+        </li>
+        <li>
+            <a href="/feed.xml" target="_blank"><span 
class="rss">Feed</span></a>
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<div class="page__footer-bottom">
+  <div>&copy; 2017 Apache incubator ServiceComb. 技术来自于 <a 
href="http://jekyllrb.com"; rel="nofollow">Jekyll</a> &amp; <a 
href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/"; 
rel="nofollow">Minimal Mistakes</a>.</div>
+</div>
+
+      </footer>
+    </div>
+
+    <script src="/assets/js/main.min.js"></script>
+
+
+
+
+  <script>
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+  ga('create', 'UA-101622733-1', 'auto');
+  ga('send', 'pageview');
+</script>
+
+
+
+
+
+
+
+  </body>
+</html>

Reply via email to