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

QPS is blocked when it reaches the threshold?? #1041

Open
yugj opened this issue Sep 12, 2019 · 2 comments
Open

QPS is blocked when it reaches the threshold?? #1041

yugj opened this issue Sep 12, 2019 · 2 comments
Labels
kind/question Category issues related to questions or problems

Comments

@yugj
Copy link

yugj commented Sep 12, 2019

环境说明

应用网关:zuul 单机

sentinel 版本:1.6.3

zuul adaptor 版本:1.6.3

数据源Zookeeper

规则数据如下:每秒针对uid限制允许访问数量8

[
  {
    "id" : 5,
    "controlBehavior" : 0,
    "resource" : "sop",
    "intervalUnit" : 0,
    "count" : 8,
    "interval" : 1,
    "gmtCreate" : 1568252327724,
    "gmtModified" : 1568253506932,
    "app" : "mg-zuul-test",
    "ip" : "10.46.235.124",
    "paramItem" : {
      "fieldName" : "uid",
      "parseStrategy" : 2
    },
    "burst" : 0,
    "resourceMode" : 0,
    "grade" : 1,
    "port" : 8721
  }
]

问题描述

观察到单位时间流量通过的是3,拒绝的是1,但是我配置的针对header uid限流的阈值是8,总流量都没有达到特定限流的值,为什么就被拦截了?,如下图

对应时间Metrics.log

1568253804000|2019-09-12 10:03:24|sop|3|1|3|0|106|0|0|3
1568253804000|2019-09-12 10:03:24|__total_inbound_traffic__|3|1|3|0|106|0|0|0

原先有出现类似问题,在另一个issue1002里面

由于这个问题我们一直不敢在生产环境使用sentinel,请教下可能是啥原因

@sentinel-bot sentinel-bot added the kind/bug Category issues or prs related to bug. label Sep 12, 2019
@sentinel-bot
Copy link
Collaborator

Hi @yugj, we detect non-English characters in the issue. This comment is an auto translation from @sentinel-bot to help other users to understand this issue.
We encourage you to describe your issue in English which is more friendly to other users.

QPS is blocked when it reaches the threshold??

Environment Description

Application gateway: zuul stand-alone

Sentinel version: 1.6.3

Zuul adaptor version: 1.6.3

Data source Zookeeper

The rule data is as follows: Permission limit per 8 for uid limit

[
  {
    "id" : 5,
    "controlBehavior" : 0,
    "resource" : "sop",
    "intervalUnit" : 0,
    "count" : 8,
    "interval" : 1,
    "gmtCreate" : 1568252327724,
    "gmtModified" : 1568253506932,
    "app" : "mg-zuul-test",
    "ip" : "10.46.235.124",
    "paramItem" : {
      "fieldName" : "uid",
      "parseStrategy" : 2
    },
    "burst" : 0,
    "resourceMode" : 0,
    "grade" : 1,
    "port" : 8721
  }
]

Problem Description

Observed that the unit time flow is 3, and the rejection is 1, but the threshold for the header uid current limit I configured is 8, and the total traffic does not reach the value of the specific current limit. Why is it intercepted? ,As shown below

Corresponding time Metrics.log

1568253804000|2019-09-12 10:03:24|sop|3|1|3|0|106|0|0|3
1568253804000|2019-09-12 10:03:24|__total_inbound_traffic__|3|1|3|0|106|0|0|0

There was a similar problem in the other [issue1002] (#1002)

Because of this problem, we have been afraid to use sentinel in the production environment. Please ask why

@sentinel-bot sentinel-bot changed the title QPS未到阈值就被拦截BUG?OR? QPS is blocked when it reaches the threshold?? Sep 12, 2019
@sczyh30 sczyh30 added kind/question Category issues related to questions or problems and removed kind/bug Category issues or prs related to bug. labels Sep 12, 2019
@sczyh30
Copy link
Member

sczyh30 commented Sep 12, 2019

This might be related to #1039

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Category issues related to questions or problems
Projects
None yet
Development

No branches or pull requests

3 participants