You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mleku
88b0509ad8
Implement PID-controlled adaptive rate limiting for database operations
- Add LoadMonitor interface in pkg/interfaces/loadmonitor/ for database load metrics
- Implement PIDController with filtered derivative to suppress high-frequency noise
- Proportional (P): immediate response to current error
- Integral (I): eliminates steady-state offset with anti-windup clamping
- Derivative (D): rate-of-change prediction with low-pass filtering
- Create BadgerLoadMonitor tracking L0 tables, compaction score, and cache hit ratio
- Create Neo4jLoadMonitor tracking query semaphore usage and latencies
- Add AdaptiveRateLimiter combining PID controllers for reads and writes
- Configure via environment variables:
- ORLY_RATE_LIMIT_ENABLED: enable/disable rate limiting
- ORLY_RATE_LIMIT_TARGET_MB: target memory limit (default 1500MB)
- ORLY_RATE_LIMIT_*_K[PID]: PID gains for reads/writes
- ORLY_RATE_LIMIT_MAX_*_MS: maximum delays
- ORLY_RATE_LIMIT_*_TARGET: setpoints for reads/writes
- Integrate rate limiter into Server struct and lifecycle management
- Add comprehensive unit tests for PID controller behavior
Files modified:
- app/config/config.go: Add rate limiting configuration options
- app/main.go: Initialize and start/stop rate limiter
- app/server.go: Add rateLimiter field to Server struct
- main.go: Create rate limiter with appropriate monitor
- pkg/run/run.go: Pass disabled limiter for test instances
- pkg/interfaces/loadmonitor/: New LoadMonitor interface
- pkg/ratelimit/: New PID controller and limiter implementation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
1 month ago |
|
.aiassistant/rules
|
Refactor export functionality in App.svelte to support both GET and POST methods for event exports, enhancing flexibility in user permissions. Update server-side handling to accommodate pubkey filtering and improve response handling for file downloads. Adjust UI components to reflect these changes, ensuring a seamless user experience.
|
3 months ago |
|
.claude
|
Add PID-controlled adaptive rate limiting plan for relay operations
|
1 month ago |
|
.gitea
|
Add serve mode, fix binary tags, document CLI tools, improve Docker
|
2 months ago |
|
.plan
|
initial draft of hot reload policy
|
2 months ago |
|
app
|
Implement PID-controlled adaptive rate limiting for database operations
|
1 month ago |
|
cmd
|
bump v0.34.1
|
1 month ago |
|
contrib/stella
|
Add serve mode, fix binary tags, document CLI tools, improve Docker
|
2 months ago |
|
docs
|
Add PID-controlled adaptive rate limiting plan for relay operations
|
1 month ago |
|
pkg
|
Implement PID-controlled adaptive rate limiting for database operations
|
1 month ago |
|
relay-tester
|
Refactor for interface clarity and dependency isolation.
|
1 month ago |
|
scripts
|
Add Neo4j integration tests and query rate-limiting logic
|
1 month ago |
|
.dockerignore
|
Add serve mode, fix binary tags, document CLI tools, improve Docker
|
2 months ago |
|
.gitignore
|
Add Claude Code skills for web frontend frameworks
|
1 month ago |
|
CLAUDE.md
|
Add WasmDB support and enhance query/cache/policy systems
|
1 month ago |
|
Dockerfile
|
Add serve mode, fix binary tags, document CLI tools, improve Docker
|
2 months ago |
|
Dockerfile.relay-tester
|
Add serve mode, fix binary tags, document CLI tools, improve Docker
|
2 months ago |
|
INDEX.md
|
Add comprehensive documentation for CLAUDE and Nostr WebSocket skills
|
2 months ago |
|
LICENSE
|
Add initial project structure with README, LICENSE, and .gitignore config
|
5 months ago |
|
POLICY_BUG_FIX_SUMMARY.md
|
fix silent fail of loading policy with panic, and bogus fallback logic
|
2 months ago |
|
README.md
|
Refactor project to modularize constants and utilities.
|
1 month ago |
|
conversation.md
|
fix policy to ignore all req/events without auth
|
2 months ago |
|
enable-policy.sh
|
fix silent fail of loading policy with panic, and bogus fallback logic
|
2 months ago |
|
go.mod
|
Refactor Neo4j tests and improve tag handling in Cypher
|
1 month ago |
|
go.sum
|
Refactor Neo4j tests and improve tag handling in Cypher
|
1 month ago |
|
libsecp256k1.so
|
fully test and verify policy script functionality
|
2 months ago |
|
main.go
|
Implement PID-controlled adaptive rate limiting for database operations
|
1 month ago |
|
policyfixes.md
|
fix policy to ignore all req/events without auth
|
2 months ago |