You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/03/02 03:02:42 UTC

[GitHub] [servicecomb-java-chassis] Github652911031 opened a new issue #2265: cse 配置实例隔离,当一个实例调用失败后会触发整个微服务的隔离

Github652911031 opened a new issue #2265:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2265


   有两个微服务
   A(一台服务器,部署在ServerA1)
   B(两台服务器,部署在ServerB1和ServerB2上)
   调用关系是A调用B.
   A的实例隔离配置microservice.yaml如下:
   loadbalance:
       retryEnabled: true 
       retryOnSame: 0 
       retryOnNext: 1 
       isolation: 
         enabled: true 
         continuousFailureThreshold: 30
         enableRequestThreshold: 40 
         singleTestTime: 5000 
       strategy:
         name: RoundRobin 
   
   测试场景如下:
    在09:56:27 使用iptables命令,在ServerB2服务器上使用iptables -I INPUT -s -j Drop命令,阻止ServerA1对ServerB2的访问,触发A对B的实例隔离
   
   观察cse.log日志,发现A会将ServerB1服务器上的实例也给隔离掉,相关日志如下:
   2021-02-27 09:56:44.353|WARN |[BRThreadPools.CPWithdrawEvtReceiverThreadPool-2]|?.?:?|Isolate service BrowserContentEventHandlerService's instance 2250615a789c11eb8722fa163e7717a3.
   2021-02-27 09:56:44.485|WARN |[BRThreadPools.CPWithdrawEvtReceiverThreadPool-2]|?.?:?|Isolate service BrowserContentEventHandlerService's instance 1ccdc64d725811ebb193fa163e7717a3.
   实际隔离了两台服务器上的实例。
   
   在隔离期间,查看cse.log日志,发现A调用ServerB1上的B服务会有如下ERROR日志:
   2021-02-27 09:56:44.349|ERROR|[BRThreadPools.CPWithdrawEvtReceiverThreadPool-3]|?.?:?|service CONSUMER rest BrowserContentEventHandlerService.EventAgentApi.sendEvents, call error, msg is cause:InvocationException,message:InvocationException: code=490;msg=CommonExceptionData [message=Cse Internal Bad Request];cause:CseException,message:This is a fallback call from circuit breaker. \n You can add fallback logic by catching this exception.
   
   预期应该是只隔离掉ServerB2上的服务实例。
   
   A服务的microservice.yaml里面配置了熔断
   handler:
       chain:
         Provider:
           default: innerServiceHttpInterceptor,qps-flowcontrol-provider,browserValidationHandler
         Consumer:
           default: qps-flowcontrol-consumer,loadbalance,bizkeeper-consumer
   但是没有配置熔断的相关参数。
   请问下这个会对实例隔离有影响吗?如果配置了bizkeeper-cousumer,但是没有配置cse.circuitBreaker的相关参数,这个熔断会开启吗?默认的熔断窗口和阈值是多大呢


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2265: cse 配置实例隔离,当一个实例调用失败后会触发整个微服务的隔离

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2265:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2265#issuecomment-788717746


   ```
   2021-02-27 09:56:44.353|WARN |[BRThreadPools.CPWithdrawEvtReceiverThreadPool-2]|?.?:?|Isolate service BrowserContentEventHandlerService's instance 2250615a789c11eb8722fa163e7717a3.
   2021-02-27 09:56:44.485|WARN |[BRThreadPools.CPWithdrawEvtReceiverThreadPool-2]|?.?:?|Isolate service BrowserContentEventHandlerService's instance 1ccdc64d725811ebb193fa163e7717a3.
   ```
   
   这个日志表明两个实例都隔离了, 你确认下是否访问serverB1的所有请求是否都是成功的。 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #2265: cse 配置实例隔离,当一个实例调用失败后会触发整个微服务的隔离

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #2265:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2265#issuecomment-788717746


   ```
   2021-02-27 09:56:44.353|WARN |[BRThreadPools.CPWithdrawEvtReceiverThreadPool-2]|?.?:?|Isolate service BrowserContentEventHandlerService's instance 2250615a789c11eb8722fa163e7717a3.
   2021-02-27 09:56:44.485|WARN |[BRThreadPools.CPWithdrawEvtReceiverThreadPool-2]|?.?:?|Isolate service BrowserContentEventHandlerService's instance 1ccdc64d725811ebb193fa163e7717a3.
   ```
   
   这个日志表明两个实例都隔离了, 你确认下是否访问serverB1的所有请求是否都是成功的。 
   
   
   bizkeeper-consumer可能导致两个实例都隔离,因为这个也提供了隔离功能,并且是服务级别的。 隔离的默认参数参考:https://docs.servicecomb.io/java-chassis/zh_CN/references-handlers/bizkeeper/
   
   你也可以尝试去掉bizkeeper-consumer,看看是否发生类似的现象。 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org