Skip to content

Conversation

@mastertiller
Copy link
Owner

@mastertiller mastertiller commented Aug 16, 2020

Describe what this PR does / why we need it

在服务数量多,拓扑复杂,处理能力逐渐变化的情况下,使用固定的最大并发会带来巨大的测试工作量,并且用户需要手动地设置很多流控规则。自适应限流就是为了解决这个问题。我们希望使用Q-Learning算法,引入智能的自适应流控策略进行限流,在最大化吞吐量的同时保障系统服务的稳定。相关issue可见#748 #1641

Does this pull request fix one issue?

#748

Describe how you did it

使用强化学习Q-Learning算法实现自适应流控。
QLearningLearner.java实现了算法的迭代更新。
QLearningMetric.java实现了算法的主要方法与参数设置。
QTableStorage.java实现QTable的读写与存储。
QInfo.java存储了决策前状态(state)、行为(action)、效用(utility)的信息。

Describe how to verify it

Special notes for reviews

# Conflicts:
#	sentinel-core/src/main/java/com/alibaba/csp/sentinel/qlearning/QInfo.java
#	sentinel-core/src/main/java/com/alibaba/csp/sentinel/qlearning/QLearningMetric.java
#	sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/block/qlearning/QLearningSlot.java
@mastertiller mastertiller changed the title Q learning [feature]Adaptive Flow Control with Q learning algorithm Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants