- Fixed Window
- Token Bucket
- Uses Redis for state storage.
- Focuses on core logic and correctness, not concurrency.
- Timestamps stored in seconds for persistence efficiency.
- Not atomic under high concurrency (will be handled in Phase 2 with Lua scripts).
- No distributed coordination across nodes yet.
- Minimal error handling and monitoring.
- Single-node Redis: no replication or failover.
- Rules are loaded in memory; -Token bucket timestamps use Instant.now().toEpochMilli(), which can cause inconsistencies in distributed setups.
Phase 2 will add:
- Atomic Redis operations via Lua scripts.
- Concurrency safety.
- Metrics and logging.