istio-ecosystem / wasm-extensions

Contains miscellaneous Wasm extensions for Istio
Apache License 2.0
107 stars 34 forks source link

Revert "Add Local Rate Limit Filter (#20)" #43

Closed bianpengyuan closed 3 years ago

bianpengyuan commented 3 years ago

This reverts commit 876d9789bdd95382305801c02682cb295871c42f.

It is actually impossible to implement local rate limiting with current Wasm ABI, as there is only get/set interface and global shared data cannot be operated atomically like refill or subtract by 1. We should remove it until we have a correct implementation.

Signed-off-by: Pengyuan Bian bianpengyuan@google.com

mandarjog commented 3 years ago

Can we have a bounded worst case with these blond writes? If you are unsing 1 worker thread you are fine. What is the worst case with 2 workers?

bianpengyuan commented 3 years ago

Worst case, assuming the rate limit user specifies is x and worker number is y, the actual rate limit could be in range [x, x*y].

bianpengyuan commented 3 years ago

@mandarjog ptal, thanks!