Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]Adaptive Flow Control with Q learning algorithm #1673

Closed
wants to merge 64 commits into from

Commits on Aug 20, 2020

  1. Add QLearning Algorithm

    mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    e163f6a View commit details
    Browse the repository at this point in the history
  2. fix some errors.

    mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    8129d7c View commit details
    Browse the repository at this point in the history
  3. fix some errors.

    mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    fab2a61 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    347cee9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9606620 View commit details
    Browse the repository at this point in the history
  6. Update Configuration

    mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    50fb979 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fca5087 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    03ea0a9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5ee9f01 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c25c0d6 View commit details
    Browse the repository at this point in the history
  11. demo: Update slot chain SPI demo (alibaba#1581)

    Signed-off-by: yunfeiyanggzq <[email protected]>
    yunfeiyanggzq authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    9437575 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1d63598 View commit details
    Browse the repository at this point in the history
  13. Adapter: Support Apache HttpClient (alibaba#1455)

    Introduce support through a customized client builder `SentinelApacheHttpClientBuilder`.
    zhaoyuguang authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    55914dd View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e7eca38 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    fbd1d31 View commit details
    Browse the repository at this point in the history
  16. Refactor config mechanism for OkHttp adapter and polish related code

    - One config per interceptor instead of the global config
    - Polish document and demo
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    8b1dc32 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    9ac7e52 View commit details
    Browse the repository at this point in the history
  18. Refactor degrade hierarchy with new circuit breaker mechanism and imp…

    …rove strategy
    
    * Add `CircuitBreaker` abstraction (with half-open state) and add circuit breaker state change event observer support.
    * Improve circuit breaking strategy (avg RT → slow request ratio) and make statistics of each rule dependent (to support arbitrary statistic interval).
    * Add simple "trial" mechanism (aka. half-open).
    * Refactor mechanism of metric recording and state change handling for circuit breakers: record RT and error when requests have completed (i.e. `onExit`, based on alibaba#1420).
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    9ac42a6 View commit details
    Browse the repository at this point in the history
  19. Update test cases for circuit breaking

    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    80eb2e8 View commit details
    Browse the repository at this point in the history
  20. Update demo for circuit breaking (DegradeRule)

    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    9c6285b View commit details
    Browse the repository at this point in the history
  21. test: Update test cases with new degrade mechanism in sentinel-demo-q…

    …uarkus
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    fc68a9d View commit details
    Browse the repository at this point in the history
  22. Remove deprecated passCheck() in Rule and polish interface

    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    e867d77 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    c84cfa6 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    508dffe View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    487c5c0 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    d6b7c0d View commit details
    Browse the repository at this point in the history
  27. Fix the bug of circuit breaker half-open state transformation when re…

    …quest is blocked by upcoming rules (alibaba#1645)
    
    * Refactor the workflow to fix the bug that circuit breaker may remain half-open state forever when the request is blocked by upcoming rules: revert the state change in exit handler (as a temporary workaround)
    * Add exit handler in Entry as a per-invocation hook.
    jasonjoo2010 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    12f6d55 View commit details
    Browse the repository at this point in the history
  28. Polish CircuitBreaker interface and update comments

    - Only carry context in tryPass/onComplete method (this might be generic in upcoming versions)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    d355cbd View commit details
    Browse the repository at this point in the history
  29. Refactor exit handler mechanism of Entry

    - Rename: whenComplete -> whenTerminate
    - Execute the exit handler directly after the onExit hook of all slots
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    f25d39b View commit details
    Browse the repository at this point in the history
  30. Add extended interface for metric extension hook to support distingui…

    …shing traffic type (alibaba#1665)
    
    - Add EntryType args to all hook methods
    Billzaifei authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    fffc848 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    f710c83 View commit details
    Browse the repository at this point in the history
  32. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    1fc2ce3 View commit details
    Browse the repository at this point in the history
  33. Refactor extended MetricExtension interface (matching events in Senti…

    …nel)
    
    - Unify the extended interface as a few event handlers: onPass, onBlocked, onComplete and onError
    - Polish related code
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    0b29214 View commit details
    Browse the repository at this point in the history
  34. Support customized origin parser in Apache Dubbo 2.7.x adapter and un…

    …ify config (alibaba#1617)
    
    * Support customized origin parser in Apache Dubbo 2.7.x adapter
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    JiangZian authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    36f6674 View commit details
    Browse the repository at this point in the history
  35. Polish code and README.md of sentinel-datasource-eureka

    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    a159a9d View commit details
    Browse the repository at this point in the history
  36. webmvc-adapter: improve to avoid ErrorEntryFreeException (alibaba#1533)

    If entry already exists in request just skip creation.
    cdfive authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    3dd8d7e View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    fe3cfe9 View commit details
    Browse the repository at this point in the history
  38. Add RuntimeException converting method in BlockException and polish l…

    …ogic for validation
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    43eb664 View commit details
    Browse the repository at this point in the history
  39. Fix NPE bug and improve default fallback in Dubbo 2.7.x adapter

    - Fix NPE bug in consumer filter (when non-biz error occurred)
    - Improve default fallback in Dubbo 2.7.x adapter: convert the BlockException to a simple RuntimeException (with necessary message)
    - Polish code and comments
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    377ec7e View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    d35511e View commit details
    Browse the repository at this point in the history
  41. add QLearningSlot

    mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    4bab731 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    8035ecd View commit details
    Browse the repository at this point in the history
  43. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    df2b89b View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    21736b7 View commit details
    Browse the repository at this point in the history
  45. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    8dd856f View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    bf334ed View commit details
    Browse the repository at this point in the history
  47. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    7cce9cc View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    1e32464 View commit details
    Browse the repository at this point in the history
  49. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    7c6bf1a View commit details
    Browse the repository at this point in the history
  50. resolve conflict

    mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    60ff415 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    ad2686d View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    350c059 View commit details
    Browse the repository at this point in the history
  53. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    7c40946 View commit details
    Browse the repository at this point in the history
  54. add QLearningSlot

    mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    7d82a7b View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    c91a210 View commit details
    Browse the repository at this point in the history
  56. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    60459b9 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    454f730 View commit details
    Browse the repository at this point in the history
  58. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    2201686 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    dc4a308 View commit details
    Browse the repository at this point in the history
  60. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    2a8f771 View commit details
    Browse the repository at this point in the history
  61. test

    Yonghao Zhu authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    a801a12 View commit details
    Browse the repository at this point in the history
  62. revert

    mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    15ecd04 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    a71062a View commit details
    Browse the repository at this point in the history
  64. Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdap…

    …terGlobalConfig (alibaba#1572)
    
    * Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
    * Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
    
    Signed-off-by: Eric Zhao <[email protected]>
    sczyh30 authored and mastertiller committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    193158b View commit details
    Browse the repository at this point in the history