Skip to content

[Performance Improvement] Implement Rate Limiting to Prevent DDoS Attacks #67

@Utkarsh4517

Description

@Utkarsh4517

Description

The website experienced a performance degradation during a load test, which revealed vulnerabilities to distributed denial-of-service (DDoS) attacks. Multiple socket errors and timeouts occurred when handling a high volume of simultaneous connections. To improve performance and ensure service stability, rate limiting should be implemented to mitigate DDoS attacks and excessive load.

Reproduction

  1. Simulate a high number of concurrent connections (e.g., 3000 connections).
  2. Use a load testing tool like wrk to generate requests for an extended period.
  3. Observe increasing latency, socket errors, and request timeouts as the server fails to handle the load.
  4. See error.

Expectation

The website should handle traffic efficiently with reduced latency, no socket errors, and minimal timeouts. It should also include mechanisms like rate limiting to prevent excessive requests from overloading the server.

Environment

  • Device: MacBook Air (M3 16gigs)
  • OS: macOS
  • Browser: All (test done via command-line tool wrk)
  • Version: N/A
  • Other info: Load testing with wrk -t12 -c3000 -d5m https://paste.fosscu.org

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions