-
Notifications
You must be signed in to change notification settings - Fork 146
fix(guard): clean up guard #3862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 01-12-fix_add_ready_chunks_to_worker_bumps_bumps_per_tick_metric
Are you sure you want to change the base?
fix(guard): clean up guard #3862
Conversation
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/virtual-websocket
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
PR Review: fix(guard): clean up guardThis PR removes the request context tracking system and simplifies guard architecture by removing per-actor tracking. Overall, the changes improve code maintainability by removing unused functionality. Here are my findings: Strengths
Code Quality Issues
Potential Bugs
Performance Considerations
Security Concerns
Test Coverage
Documentation
Style and Conventions
SummaryThis is a solid cleanup PR that removes unused functionality. The main concerns are:
The architectural simplification is good, but make sure the rate limiting changes align with product requirements before merging. |
c079c96 to
9e8cf3d
Compare
3df8f27 to
a2b521a
Compare
9e8cf3d to
3008b28
Compare
a2b521a to
061a672
Compare
|
@NathanFlurry make sure to double check that re-enabling rate limiters and route cache here (now that its not per actor id but just IP) is fine |
3008b28 to
70900c0
Compare
061a672 to
535af14
Compare
NathanFlurry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crank limit to nutso levels
70900c0 to
5f50433
Compare
535af14 to
24b4824
Compare
5f50433 to
d4e5e20
Compare
24b4824 to
45cdaf0
Compare
NathanFlurry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rate limit looks unchanged??
d4e5e20 to
f831199
Compare
|
I'm not sure where the changes went, should be there now |
f831199 to
c90f0b8
Compare
Pull Request Review: fix(guard): clean up guardSummaryThis PR significantly simplifies the guard proxy service by removing the request analytics/context tracking system and refactoring the middleware and routing layers to pass ✅ Strengths
🔴 Critical Issues1. Removed Analytics Without Migration Path (proxy_service.rs)The entire
Impact: Complete loss of request analytics data. If this data was used for monitoring, debugging, or billing, this is a breaking change. Recommendation:
|
🔴 Critical Issues (continued)2. Middleware Function Signature Breaking Change (proxy_service.rs:210-217)The middleware function signature changed, removing the actor_id parameter. Impact: This breaks all existing middleware implementations. While Recommendation: Document this breaking change in commit message or PR description 3. Rate Limiting Behavior Change (proxy_service.rs:510-548)Previously, rate limiting was per-actor + IP. Now it's only per-IP. Impact:
Recommendation: Reconsider if this is the desired behavior. If per-actor limits are needed, you may need to keep actor_id in the cache key. 4. Default Middleware Config Change (proxy_service.rs:455-488)The fallback middleware config changed significantly:
Impact: This is a 100x increase in rate limits and concurrent requests. While more permissive, it may expose services to higher load than expected and could mask performance issues during development. Recommendation: Document this change and ensure it aligns with intended behavior. |
|
c90f0b8 to
9d72300
Compare
💡 Suggestions & 🧪 Testing Concerns9. Documentation Needed for
|
45cdaf0 to
445bb05
Compare
Pull Request Review: fix(guard): clean up guardSummaryThis PR performs a significant cleanup of the guard system by removing the RequestContext analytics tracking infrastructure and simplifying the middleware and routing systems. The changes remove actor-specific rate limiting in favor of IP-based rate limiting and pass ray_id/req_id directly through the call chain. Positive Changes✅ Simplified Architecture: Removing the RequestContext reduces complexity and removes unused analytics infrastructure ✅ Cleaner API Surface: The CustomServeTrait now has a cleaner interface with explicit ray_id and req_id parameters ✅ Consistent Middleware: Middleware configuration is now uniform and not actor-specific ✅ Better Default Limits: Increased default rate limits (100→10000 requests/min) and in-flight limits (20→2000) are more reasonable Issues & Concerns🔴 Critical Issues1. Removed Actor-Level Rate Limiting (proxy_service.rs:513-542)
2. Removed ClickHouse Analytics (proxy_service.rs:217, 327)
3. Middleware Function Signature Change (proxy_service.rs:212-219)
|
445bb05 to
a084bd6
Compare
9d72300 to
875a7a4
Compare
a084bd6 to
fab1f2d
Compare
875a7a4 to
920b1d9
Compare

No description provided.