apisix icon indicating copy to clipboard operation
apisix copied to clipboard

request help: add service_id as key to plugin limit-*

Open LY-GO opened this issue 6 years ago • 20 comments

Issue description

i want to add key for limit-plugin;it can accomplish limit according to service_id;If i want to implement the function,you can give some suggestion.Thanks!

Environment

  • apisix version (cmd: apisix version):
  • OS:

LY-GO avatar Oct 20 '20 09:10 LY-GO

  1. you need to use a better title.
  2. one issue for one thing: add service_id as key to plugin limit-*, do you mean this?

membphis avatar Oct 20 '20 09:10 membphis

Sorry,my English not better;one issue : add service_id as key to plugin limit-*,i mean that.

LY-GO avatar Oct 21 '20 01:10 LY-GO

  1. you need to use a better title.
  2. one issue for one thing: add service_id as key to plugin limit-*, do you mean this? now i set key in the following way,but service_id is nil.Why is that? service_id

service-name

LY-GO avatar Oct 22 '20 10:10 LY-GO

I think we can support service_id as key to plugin limit-count first. so you can update the title of this issue.

after we resolve this issue, you can create more issues for other limit-* plugins.

membphis avatar Oct 23 '20 08:10 membphis

2. now i set key in the following way,but service_id is nil.Why is that?

do you bind any service to route?

membphis avatar Oct 23 '20 08:10 membphis

  1. now i set key in the following way,but service_id is nil.Why is that?

do you bind any service to route?

yes services

LY-GO avatar Oct 23 '20 08:10 LY-GO

  1. now i set key in the following way,but service_id is nil.Why is that?

do you bind any service to route?

we can use core.var.service_id to acquire value of service_id?

LY-GO avatar Oct 23 '20 10:10 LY-GO

this old version dashboard, so it not support service_id as key.

membphis avatar Oct 23 '20 13:10 membphis

this old version dashboard, so it not support service_id as key.

new version supports service_id as key?my version is 1.5,Is there any other version

LY-GO avatar Oct 23 '20 15:10 LY-GO

please make a try with the master branch ^_^

membphis avatar Oct 24 '20 00:10 membphis

this old version dashboard, so it not support service_id as key.

new version supports service_id as key?my version is 1.5,Is there any other version

The new dashboard doesn't support the Service module currently.

tracking issue: https://github.com/apache/apisix-dashboard/issues/471

juzhiyuan avatar Oct 24 '20 01:10 juzhiyuan

please make a try with the master branch ^_^

i still use the master branch

LY-GO avatar Oct 27 '20 13:10 LY-GO

https://github.com/apache/apisix/blob/master/apisix/plugins/limit-count.lua#L39

plugin limit-count, it has supported using service_id as key in master branch.

which plugin you want to support service_id ?

membphis avatar Oct 27 '20 13:10 membphis

please make a try with the master branch ^_^

I can require service_id from Eureka?

LY-GO avatar Oct 27 '20 13:10 LY-GO

https://github.com/apache/apisix/blob/master/apisix/plugins/limit-count.lua#L39

plugin limit-count, it has supported using service_id as key in master branch.

which plugin you want to support service_id ?

plugin of limit-conn and limit-req

LY-GO avatar Oct 27 '20 14:10 LY-GO

welcome to submit PR to support service_id for limit-conn or limit-req.

they were should be the same as limit-count.

membphis avatar Oct 28 '20 14:10 membphis

welcome to submit PR to support service_id for limit-conn or limit-req.

they were should be the same as limit-count.

How can i require service_id through Euerka?

LY-GO avatar Oct 29 '20 02:10 LY-GO

How can i require service_id through Euerka?

sorry I do not understand your question.

membphis avatar Oct 30 '20 14:10 membphis

This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Oct 16 '21 10:10 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

github-actions[bot] avatar Oct 30 '21 10:10 github-actions[bot]