higress icon indicating copy to clipboard operation
higress copied to clipboard

Implement the Golang version of the existing CPP Wasm plugin: key-rate-limit

Open WeixinX opened this issue 1 year ago • 6 comments

WeixinX avatar Oct 20 '23 02:10 WeixinX

I want to have a try

ZackSoul avatar Nov 05 '23 09:11 ZackSoul

And, I noticed that the rank of this issue was adjusted to CHALLENGE, so shouldn't there be another developer involved, hopefully I can get some guidance, thanks!

ZackSoul avatar Nov 15 '23 15:11 ZackSoul

Yeah, the rank was adjusted to level/challenge , because the wasm-go sdk needs to be extended to support it first. The areas that need to be expanded are as follows:

  1. Support the hostcall function onTick which binding to the vm context
  2. Design a mechanism that can identify different rules using the same "limit_key"(apply to different domains or ingresses)

johnlanni avatar Nov 16 '23 03:11 johnlanni

我正在编写key-rate-limit的e2e测试,但是我使用goroutine并发进行测试时发现由于http.MakeRequestAndExpectEventuallyConsistentResponse函数为了到达requiredConsecutiveSuccesses = 3的要求时会重复发送请求,这导致我并不能按照我规定的请求数判断预期结果导致测试失败,不知道我的描述是否清晰,期望得到一点帮助,谢谢。

ZackSoul avatar Dec 14 '23 11:12 ZackSoul

期待回复和帮助

ZackSoul avatar Dec 29 '23 12:12 ZackSoul

@ZackSoul 可以修改e2e测试框架从而来满足你的测试需求

johnlanni avatar Jan 02 '24 06:01 johnlanni