title: “Invoke Control” lang: en ref: invoke-control permalink: /docs/users/invoke-control/ excerpt: “Invoke Control” last_modified_at: 2017-08-15T15:01:43-04:00 redirect_from:

  • /theme-setup/

{% include toc %}

Instance-Level Fault Isolation

Scenario

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.

Configuration

This instance-level fault isolation function is integrated into the load balancing function. For configuration of the load balancing policy, see Service Configurations. For parameters associated with instance-level fault isolation in the load balancing policy, see table below:

Configuration ItemDefault ValueValue RangeMandatoryDescriptionRemark
servicecomb.loadbalance.isolation.enabledfalseBooleanNoSpecifies whether to enable faulty instance isolation.-
servicecomb.loadbalance.isolation.enableRequestThreshold20IntegerNoSpecifies the threshold number of instance calls. If this value is reached, isolation is enabled.-
servicecomb.loadbalance.isolation.errorThresholdPercentage20Integer, (0,100]NoSpecifies the error percentage. Instance fault isolation is enabled when the set value is reached.-
servicecomb.loadbalance.isolation.singleTestTime10000IntegerNoSpecifies the duration of a faulty instance test on a single node.

Circuit Break Policy

Scenario

Circuit brake policy can configure ServiceComb fallback capability, you can configure conditions under which service will stop send request after circuit break policy configured.

Configuration

Circuit break is part of fallback policy when a service request is abnormal, relevant concept such as isolation and fault tolerance please refer to fallback policy

Flow Control Policy

Scenario

You can limit the frequency of request send to specific microservice when flow control was enables in consumer service.

Precaution

See detail info at Service Configurations

Configuration

Flow control policy configuration is in microservice.yaml file. You need to configure consumer handler in chain of service. See example blow:

servicecomb:
  handler:
    chain:
      Consumer:
        default: qps-flowcontrol-consumer

Configuration items of QPS:

Configuration ItemDefault ValueValue RangeMandatoryDescriptionRemark
servicecomb.flowcontrol.Consumer.qps.enabledtrueBooleanNoSpecifies whether consumers flowcontrol enables.-
servicecomb.flowcontrol.Consumer.qps.limit.[ServiceName].[Schema].[operation]2147483647 (max int)(0,2147483647], IntegerNoSpecifies number of requests per second.Support three level configurations: microservice、schema、operation.