1

Recently I've been working on a small chat program that utilizes web sockets to send messages to others that are connected to the website.

It is currently working great, the only problem I have with this is flood control. People are able to spam the chat without being blocked.

Essentially what I am looking for is some ideas about on how to control spam (ie if they send x messages in x time, they will be limited for x amount of time).

mattrick
  • 3,580
  • 6
  • 27
  • 43
  • Google ["rate limiting algorithm"](https://www.google.com/search?q=rate+limiting+algorithm&oq=rate+limiting+algorithm) and you will find all sorts of algorithm possibilities including this StackOverflow question: [What's a good rate limiting algorithm?](http://stackoverflow.com/questions/667508/whats-a-good-rate-limiting-algorithm). – jfriend00 Feb 17 '15 at 04:02
  • Thank you that was helpful will implement this now! :) If you want post an answer so I can give you top answer. – mattrick Feb 17 '15 at 04:47

1 Answers1

-2

If you Google "rate limiting algorithm", you will find all sorts of algorithm possibilities including this StackOverflow question: What's a good rate limiting algorithm?

Community
  • 1
  • 1
jfriend00
  • 683,504
  • 96
  • 985
  • 979