Skip to content

BE-71: Adaptive Rate Limiting Filter for Socket Move Injection & DoS Mitigation #1138

Description

@chinweobtagaz

Problem Statement

Malicious actors could flood the WebSocket server with illegal move packets or rapid ping frames, degrading server performance.

Proposed Solution

  1. Implement token bucket rate limiter per active WebSocket session in Actix actor.
  2. Allow maximum 10 client frames per second with burst allowance of 20.
  3. Automatically terminate connection and issue temporary cooldown on repeated violations.

Acceptance Criteria

  • Rapid spam packets dropped before reaching chess engine validation logic.
  • Legitimate premove bursts handled smoothly without false-positive disconnects.
  • Metrics for dropped frames exported to Prometheus.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions