Projects tigase _server server-core Issues #798
Limit number of messages that are stored in DB per user within a period of time (#798)
Artur Hefczyc opened 8 years ago

To prevent system impact of DOS/DDOS attack we have to limit number of messages that can be stored in DB per user with a specific period of time. Regardless the user is online or offline.

Andrzej Wójcik (Tigase) commented 6 years ago

I do not get how it should work. For example, we have a user who is sending too many messages, then he will be limited by tigase-spam and throttling of the connection. On the other hand, if we have incoming S2S messages then tigase-spam will filter them and block them if SPAM would be detected.

If we would store only some messages and deliver them to the user (if he is online) then MAM would not work as expected and it would create other issues.

Artur, could you explain how it should work? Should those messages be delivered but not saved? Dropped? or maybe should be bounced with an error?

Artur Hefczyc commented 6 years ago

I do not remember what exactly I had in mind 2 years ago when I opened this ticket but I think we have at least 2 cases here:

  • Offline message storage - let's say there is a user who stopped using the system but his account keeps receiving messages. We do not want his offline message store grow indefinitely. We simply need a limit on his offline queue.
  • MA or UA archive for a user - regardless whether a user uses service regularly his message archive can grow significantly taking up disk space and resources. So there should be limits on the archive size on per user basis. Plus we had this concept to offer premium accounts. It would be a good feature to offer small archive for free users and larger for premium users.
Andrzej Wójcik (Tigase) commented 6 years ago

Artur Hefczyc wrote:

I do not remember what exactly I had in mind 2 years ago when I opened this ticket but I think we have at least 2 cases here:

  • Offline message storage - let's say there is a user who stopped using the system but his account keeps receiving messages. We do not want his offline message store grow indefinitely. We simply need a limit on his offline queue.

This is something which we already have. There is a limit of messages stored in the offline storage.

  • MA or UA archive for a user - regardless whether a user uses service regularly his message archive can grow significantly taking up disk space and resources. So there should be limits on the archive size on per user basis. Plus we had this concept to offer premium accounts. It would be a good feature to offer small archive for free users and larger for premium users.

We have something called cleanup of old messages and I suppose that this is something better as it allows us to remove messages older than X (day, months) and regain free space.

So it looks like we have everything already in place?

Artur Hefczyc commented 6 years ago

Yes, it looks like we are good here, we can close the ticket.

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
RedmineID
5215
Version
tigase-server-8.1.0
Spent time
1h 15m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#798
Please wait...
Page is in error, reload to recover