envoyproxy/envoy

Rate limit: add support for delay before rejection

Open

#14,264 建立於 2020年12月3日

在 GitHub 查看
 (8 留言) (1 反應) (0 負責人)C++ (5,373 fork)batch import
area/ratelimithelp wanted

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

Title: Rate limit: add support for delay before rejection

Description:

When a connection or request is rate limited by the L4/L7 local rate limit filters, instead of immediately rejecting the connection or request it would be useful to reject after a pre-configured delay. That way, a malicious user is not able to retry as fast as possible which provides a better DoS protection for Envoy.

I believe the RLS service called by the rate limit filter can implement a delay on its end but it would be nice to have that functionality in Envoy especially for the local rate limit filter but could be shared by the global rate limit filter as well.

Envoy doc

Proposed Solution:

Add config to specify the delay. For rejected requests, schedule a timer event and do the actual rejection when the timer calls back.

貢獻者指南