| <!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="en" class="no-js"> |
| <head> |
| <meta charset="utf-8"> |
| |
| <!-- begin SEO --> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <title>Invoke Control - Apache ServiceComb</title> |
| |
| |
| |
| |
| <meta name="description" content="Invoke Control"> |
| |
| |
| |
| |
| <meta name="author" content=""> |
| |
| <meta property="og:locale" content="en"> |
| <meta property="og:site_name" content="Apache ServiceComb"> |
| <meta property="og:title" content="Invoke Control"> |
| |
| |
| <link rel="canonical" href="https://github.com/pages/apache/incubator-servicecomb-website/docs/users/invoke-control/"> |
| <meta property="og:url" content="https://github.com/pages/apache/incubator-servicecomb-website/docs/users/invoke-control/"> |
| |
| |
| |
| <meta property="og:description" content="Invoke Control"> |
| |
| |
| |
| <meta name="twitter:site" content="@ServiceComb"> |
| <meta name="twitter:title" content="Invoke Control"> |
| <meta name="twitter:description" content="Invoke Control"> |
| <meta name="twitter:url" content=""> |
| |
| |
| <meta name="twitter:card" content="summary"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <script type="application/ld+json"> |
| { |
| "@context" : "http://schema.org", |
| "@type" : "Person", |
| "name" : "Apache ServiceComb", |
| "url" : "https://github.com/pages/apache/incubator-servicecomb-website", |
| "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 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/vendor/prism/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?v=1"> |
| <link rel="stylesheet" href="/assets/vendor/prism/prism.css?v=1"> |
| |
| <!--[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.loli.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" onmouseleave="$('#childrenShow').css('display', 'none')"> |
| <div class="masthead__inner-wrap"> |
| <div class="masthead__menu"> |
| <nav id="site-nav" class="greedy-nav"> |
| |
| <a class="site-title active" href="/"><img src="https://www.apache.org/img/servicecomb.png"></a> |
| |
| <ul class="visible-links"> |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/">Home</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/developers/">Projects</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="def-nav-li" onmouseenter="$('#childrenShow').css('display', 'block')"> |
| |
| |
| |
| |
| |
| <a class="active" href="/docs/users/">Documentation</a> |
| |
| |
| <ul id="childrenShow" class="def-children-show-en" onmouseleave="$('#childrenShow').css('display', 'none')"> |
| |
| <li><a href="/docs/getting-started/" class="">Getting started</a></li> |
| |
| <li><a href="/docs/users/" class="">Docs</a></li> |
| |
| <li><a href="/slides/" class="">Video</a></li> |
| |
| <li><a href="/faqs/" class="">FAQ</a></li> |
| |
| </ul> |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/developers/contributing">Community</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/year-archive/">Blogs</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/release/">Downloads</a> |
| |
| </li> |
| |
| |
| </ul> |
| <button><div class="navicon"></div></button> |
| <ul class="hidden-links hidden"></ul> |
| <div class="nav-lang"> |
| |
| |
| <a href=/cn/docs/users/invoke-control/>中文</a> |
| |
| </div> |
| </nav> |
| </div> |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| |
| <div id="main" role="main"> |
| |
| <div class="sidebar sticky"> |
| |
| <div class="back-to-home"><a href="/">Home</a> > Invoke Control</div> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <nav class="nav__list"> |
| |
| <input id="ac-toc" name="accordion-toc" type="checkbox" /> |
| <label for="ac-toc">Toggle Menu</label> |
| <ul class="nav__items"> |
| |
| <li> |
| |
| <span class="nav__sub-title">Java Chassis User Guide</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="https://docs.servicecomb.io/java-chassis/en_US/index.html" class="">1.2.1</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li> |
| |
| <span class="nav__sub-title">Saga User Guide</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="https://docs.servicecomb.io/saga/en_US/index.html" class="">0.5.0</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li> |
| |
| <span class="nav__sub-title">ServiceCenter User Guide</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="https://docs.servicecomb.io/service-center/en_US/index.html" class="">1.2.0</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li> |
| |
| <span class="nav__sub-title">Kie User Guide</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/kie/0.1.0/index.html" class="">0.1.0</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li> |
| |
| <span class="nav__sub-title">Mesher User Guide</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/mesher/1.6.3/index.html" class="">1.6.3</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| |
| |
| </div> |
| |
| |
| |
| <article class="page" itemscope itemtype="http://schema.org/CreativeWork"> |
| <meta itemprop="headline" content="Invoke Control"> |
| <meta itemprop="description" content="Invoke Control"> |
| |
| <meta itemprop="dateModified" content="August 15, 2017"> |
| |
| <div class="page__inner-wrap"> |
| |
| |
| <header> |
| <h1 class="page__title" itemprop="headline">Invoke Control |
| </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> On This Page</h4></header> --> |
| <ul class="toc__menu" id="markdown-toc"> |
| <li><a href="#instance-level-fault-isolation" id="markdown-toc-instance-level-fault-isolation">Instance-Level Fault Isolation</a> <ul> |
| <li><a href="#scenario" id="markdown-toc-scenario">Scenario</a></li> |
| <li><a href="#configuration" id="markdown-toc-configuration">Configuration</a></li> |
| </ul> |
| </li> |
| <li><a href="#circuit-break-policy" id="markdown-toc-circuit-break-policy">Circuit Break Policy</a> <ul> |
| <li><a href="#scenario-1" id="markdown-toc-scenario-1">Scenario</a></li> |
| <li><a href="#configuration-1" id="markdown-toc-configuration-1">Configuration</a></li> |
| </ul> |
| </li> |
| <li><a href="#flow-control-policy" id="markdown-toc-flow-control-policy">Flow Control Policy</a> <ul> |
| <li><a href="#scenario-2" id="markdown-toc-scenario-2">Scenario</a></li> |
| <li><a href="#precaution" id="markdown-toc-precaution">Precaution</a></li> |
| <li><a href="#configuration-2" id="markdown-toc-configuration-2">Configuration</a></li> |
| </ul> |
| </li> |
| </ul> |
| |
| </nav> |
| </aside> |
| |
| <h2 id="instance-level-fault-isolation">Instance-Level Fault Isolation</h2> |
| |
| <h3 id="scenario">Scenario</h3> |
| |
| <p>In the scenario where some instances fail to be called, the instance-level fault isolation function stops the ServiceComb framework from sending requests to the faulty instance.</p> |
| |
| <h3 id="configuration">Configuration</h3> |
| |
| <p>This instance-level fault isolation function is integrated into the load balancing function. For configuration of the load balancing policy, see <a href="/users/service-configurations/#负载均衡策略">Service Configurations</a>. For parameters associated with instance-level fault isolation in the load balancing policy, see table below:</p> |
| |
| <table> |
| <thead> |
| <tr> |
| <th style="text-align: left">Configuration Item</th> |
| <th style="text-align: left">Default Value</th> |
| <th style="text-align: left">Value Range</th> |
| <th style="text-align: left">Mandatory</th> |
| <th style="text-align: left">Description</th> |
| <th style="text-align: left">Remark</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td style="text-align: left">servicecomb.loadbalance.isolation.enabled</td> |
| <td style="text-align: left">false</td> |
| <td style="text-align: left">Boolean</td> |
| <td style="text-align: left">No</td> |
| <td style="text-align: left">Specifies whether to enable faulty instance isolation.</td> |
| <td style="text-align: left">-</td> |
| </tr> |
| <tr> |
| <td style="text-align: left">servicecomb.loadbalance.isolation.enableRequestThreshold</td> |
| <td style="text-align: left">20</td> |
| <td style="text-align: left">Integer</td> |
| <td style="text-align: left">No</td> |
| <td style="text-align: left">Specifies the threshold number of instance calls. If this value is reached, isolation is enabled.</td> |
| <td style="text-align: left">-</td> |
| </tr> |
| <tr> |
| <td style="text-align: left">servicecomb.loadbalance.isolation.errorThresholdPercentage</td> |
| <td style="text-align: left">20</td> |
| <td style="text-align: left">Integer, (0,100]</td> |
| <td style="text-align: left">No</td> |
| <td style="text-align: left">Specifies the error percentage. Instance fault isolation is enabled when the set value is reached.</td> |
| <td style="text-align: left">-</td> |
| </tr> |
| <tr> |
| <td style="text-align: left">servicecomb.loadbalance.isolation.singleTestTime</td> |
| <td style="text-align: left">10000</td> |
| <td style="text-align: left">Integer</td> |
| <td style="text-align: left">No</td> |
| <td style="text-align: left">Specifies the duration of a faulty instance test on a single node.</td> |
| <td style="text-align: left"> </td> |
| </tr> |
| </tbody> |
| </table> |
| |
| <h2 id="circuit-break-policy">Circuit Break Policy</h2> |
| <h3 id="scenario-1">Scenario</h3> |
| |
| <p>Circuit brake policy can configure ServiceComb fallback capability, you can configure conditions under which service will stop send request after circuit break policy configured.</p> |
| |
| <h3 id="configuration-1">Configuration</h3> |
| |
| <p>Circuit break is part of fallback policy when a service request is abnormal, relevant concept such as isolation and fault tolerance please refer to <a href="/users/service-configurations/#降级策略">fallback policy</a>。</p> |
| |
| <h2 id="flow-control-policy">Flow Control Policy</h2> |
| <h3 id="scenario-2">Scenario</h3> |
| |
| <p>You can limit the frequency of request send to specific microservice when flow control was enables in consumer service.</p> |
| |
| <h3 id="precaution">Precaution</h3> |
| |
| <p>See detail info at <a href="/users/service-configurations/#限流策略">Service Configurations</a>。</p> |
| |
| <h3 id="configuration-2">Configuration</h3> |
| |
| <p>Flow control policy configuration is in microservice.yaml file. You need to configure consumer handler in chain of service. See example blow:</p> |
| |
| <div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">servicecomb</span><span class="pi">:</span> |
| <span class="na">handler</span><span class="pi">:</span> |
| <span class="na">chain</span><span class="pi">:</span> |
| <span class="na">Consumer</span><span class="pi">:</span> |
| <span class="na">default</span><span class="pi">:</span> <span class="s">qps-flowcontrol-consumer</span> |
| </code></pre></div></div> |
| |
| <p>Configuration items of QPS:</p> |
| |
| <table> |
| <thead> |
| <tr> |
| <th style="text-align: left">Configuration Item</th> |
| <th style="text-align: left">Default Value</th> |
| <th style="text-align: left">Value Range</th> |
| <th style="text-align: left">Mandatory</th> |
| <th style="text-align: left">Description</th> |
| <th style="text-align: left">Remark</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td style="text-align: left">servicecomb.flowcontrol.Consumer.qps.enabled</td> |
| <td style="text-align: left">true</td> |
| <td style="text-align: left">Boolean</td> |
| <td style="text-align: left">No</td> |
| <td style="text-align: left">Specifies whether consumers flowcontrol enables.</td> |
| <td style="text-align: left">-</td> |
| </tr> |
| <tr> |
| <td style="text-align: left">servicecomb.flowcontrol.Consumer.qps.limit.[ServiceName].[Schema].[operation]</td> |
| <td style="text-align: left">2147483647 (max int)</td> |
| <td style="text-align: left">(0,2147483647], Integer</td> |
| <td style="text-align: left">No</td> |
| <td style="text-align: left">Specifies number of requests per second.</td> |
| <td style="text-align: left">Support three level configurations: microservice、schema、operation.</td> |
| </tr> |
| </tbody> |
| </table> |
| |
| |
| |
| </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">Resources</p> |
| <li><a href="/docs/getting-started/">Getting started</a></li> |
| <li><a href="/docs/users/">User Guide</a></li> |
| <li><a href="/slides/">Slides</a></li> |
| <li><a href="/users/faq/">Common Questions</a></li> |
| </ul> |
| </div> |
| <div class="col"> |
| <ul> |
| <p class="header">ASF</p> |
| <li><a href="http://www.apache.org">Foundation</a></li> |
| <li><a href="http://www.apache.org/licenses/">License</a></li> |
| <li><a href="http://www.apache.org/events/current-event">Events</a></li> |
| <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> |
| <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li> |
| </ul> |
| </div> |
| <div class="col"> |
| <ul> |
| <p class="header">Contribute</p> |
| <li><a href="http://issues.apache.org/jira/browse/SCB">Report a Doc Issue</a></li> |
| <li><a href="https://github.com/apache/servicecomb-website/edit/master/_users/invoke-control.md">Edit This Page on Github</a></li> |
| <li><a href="/developers/submit-codes/">Code Submit Guide</a></li> |
| <li><a href="/security">Security</a></li> |
| </ul> |
| </div> |
| <div class="col"> |
| <ul class="social-icons"> |
| <p class="header">Community</p> |
| <li> |
| <a href="mailto:dev-subscribe@servicecomb.incubator.apache.org" rel="nofollow"><span class="mail">Mailing List</span></a> |
| </li> |
| <li> |
| <a href="https://github.com/apache?q=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>© 2020 Apache ServiceComb. Powered by <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div> |
| <div>All other marks mentioned may be trademarks or registered trademarks of their respective owners.</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> |