@@ -152,24 +152,6 @@ private ServerInterceptor generateRlqsInterceptor(RlqsFilterConfig config) {
152
152
@ Override
153
153
public <ReqT , RespT > Listener <ReqT > interceptCall (
154
154
ServerCall <ReqT , RespT > call , Metadata headers , ServerCallHandler <ReqT , RespT > next ) {
155
- // Notes:
156
- // map domain() -> an incarnation of bucket matchers, f.e. new RlqsEngine(domain, matchers).
157
- // shared resource holder, acquire every rpc
158
- // Store RLQS Client or channel in the config as a reference - FilterConfig config ref
159
- // when parse.
160
- // - atomic maybe
161
- // - allocate channel on demand / ref counting
162
- // - and interface to notify service interceptor on shutdown
163
- // - destroy channel when ref count 0
164
- // potentially many RLQS Clients sharing a channel to grpc RLQS service -
165
- // TODO(sergiitk): [QUESTION] look up how cache is looked up
166
- // now we create filters every RPC. will be change in RBAC.
167
- // we need to avoid recreating filter when config doesn't change
168
- // m: trigger close() after we create new instances
169
- // RBAC filter recreate? - has to be fixed for RBAC
170
- // AI: follow up with Eric on how cache is shared, this changes if we need to cache
171
- // interceptor
172
- // AI: discuss the lifetime of RLQS channel and the cache - needs wider per-lang discussion.
173
155
RlqsRateLimitResult result = rlqsEngine .rateLimit (HttpMatchInput .create (headers , call ));
174
156
if (result .isAllowed ()) {
175
157
return next .startCall (call , headers );
0 commit comments