[ 
https://issues.apache.org/jira/browse/STORM-886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15192403#comment-15192403
 ] 

ASF GitHub Bot commented on STORM-886:
--------------------------------------

Github user acommuni commented on the pull request:

    https://github.com/apache/storm/pull/700#issuecomment-195988246
  
    In case external system is down, it could be interesting to pause the Spout 
for an amount of time. The state "OPEN" of the CB could be directly linked to 
the spout. I don't know if the implementation of the back pressure is 
manageable through public API. But it would be a nice enhancement to be able to 
implement Circuit Breaker algorithm with bolt and spout. 
    
    Error count and timeout generated by request to external system can be 
detected by the bolt using those external component and could be propagated to 
the spout. In case the amount of consecutive error reaches a defined value the 
spout could be paused by the bolt for an amout of time (CLOSE to OPEN state). 
After sleeping the spout is considered in HALF OPEN state. If new error occurs 
spout sleeps for another amount of time else it goes to CLOSE state and 
continue to read new tuples.
    
    Being able to use Circuit breaker framework like Hystrix could be a nice 
enhancement of the back pressure feature.
    
    https://github.com/Netflix/Hystrix
    https://github.com/Netflix/Hystrix/wiki/How-it-Works
    



> Automatic Back Pressure
> -----------------------
>
>                 Key: STORM-886
>                 URL: https://issues.apache.org/jira/browse/STORM-886
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: storm-core
>            Reporter: Robert Joseph Evans
>            Assignee: Zhuo Liu
>             Fix For: 1.0.0
>
>         Attachments: aSimpleExampleOfBackpressure.png, backpressure.png
>
>
> This new feature is aimed for automatic flow control through the topology DAG 
> since different components may have unmatched tuple processing speed. 
> Currently, the tuples may get dropped if the downstream components can not 
> process as quickly, thereby causing a waste of network bandwidth and 
> processing capability. In addition, it is difficult to tune the 
> max.spout.pending parameter for best backpressure performance. Another big 
> motivation is that using max.spout.pending for flow control forces users to 
> enable acking, which does not make sense.
> Therefore, an automatic back pressure scheme is highly desirable. 
> Heron proposed a form of back pressure that  does not rely on acking or max 
> spout pending.  Instead spouts throttle not only when max.spout.pending is 
> hit, but also if any bolt has gone over a high water mark in their input 
> queue, and has not yet gone below a low water mark again.  There is a lot of 
> room for potential improvement here around control theory and having spouts 
> only respond to downstream bolts backing up, but a simple bang-bang 
> controller like this is a great start.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to