Basically I plan on using webhooks to log a lot of things in my game. Some of these logs will easily surpass the rate limit making some of my logs not go through. So what I want to achieve is a system where the logs basically wait out the rate limit before sending the webhooks that way all the logs can go through properly.
How should I go about doing this? I’d also want this to be designed in a way that if a server were to shutdown it wouldn’t just terminate any waiting requests.
I send out my webhooks using a table: storing the webhook data in that table and then sending out the webhooks every couple of seconds to ensure that I am not spamming the service which I am using. That being said, the data I intend to send out is not important data and therefore I do not mind if it is lost due to the server being closed.
There is a character limit on webhooks. I already do this in some cases. And this doesnt make it so rate limits are just ignored. Even if I cache them rate limits could still be exceeded depending on how large the game is.
? I dont understand how using discord is any different. The rate limits are actually the same and theres still a character limit on discord too. Its nearly identical on how discord and guilded webhooks work (intentionally made that way by guilded to make it easier to switch from discord to guilded)
And like awokein said, discord discourages the use of logging meanwhile guilded allows it as long as you respect the rate limits.
This wont work in my use case like I said I plan on having a lot of logs. Simply waiting every X seconds wont cut it for me. What if there is 60 servers sending messages every 5 seconds for example. That solution would only apply for small logs that wont frequently occur.
I want to make a queue system that assures rate limits dont happen under any circumstances.
Its not for the purpose of analytics. Mainly for moderation.
It returns more than just leaving and joining. I return certain stats like their money and location before they joined, and once they left.
Games around my genre have a lot of problems regarding cheating, exploiters, and in some cases framing other players. I want to be able to match video evidence to logs to prevent any kind of framing.
E.g someone submits a video of a hacker I’d be able to tell that the hacker was in the same server as the player and where they’ve been to back up the video evidence.
This is the only way to prevent that kind of framing.
I still agree with MichiganIsFake here, there is no need to send out this data so frequently. You should, instead, have a piece of logic in your code that looks for suspiciously high increments of data (perhaps check it against a threshold that you consider normal) and if that data increase is too high then you can send out a log for suspicious changes in data.
In-terms of verifying location, there is still better ways to authenticate this kind of information rather than sending out a log each time they join and leave – also what if they were in the game at the time specified, just not in the location?
Either way, it’s hard to give you specific help because I simply do not know what your game is or why framing would be beneficial.
framing isn’t beneficial in anyway its simply something people to do out of grudge or jealousy. It’s a highly competitive game where losing is punishing as well as the game being paid access.
If they were in the game at the time specified and not the location I have a separate log planned that’ll get a players coords every minute, compile it into one big message and once it hits the character limit it’ll send it as a webhook. I’d also have kill logs so if the exploiter killed someone I could match that.
I think its reasonable to have these logs as long as they respect rate limits which is why I want to have a queue system. In similar games there were people actually making money off “hitman services” where someone would pay sometimes upwards of $100 USD just to get another player banned. So it is actually a genuine and reasonable concern to have.
The logs can prove useful for more than just framing as well. I dont see an issue with having these logs as long as theres a nice system in place to respect rate limits.
Probably also worth adding the competitive nature of the game is that its “permadeath” you have characters that you could build up over the course of months and you could lose all that progress by dying enough times. Theres a lives system and once you lose all your lives you will lose all the progress on that character. There is of course ways to regain lives back but its very difficult. This explains why someone may get upset enough to actually go out of their way to get a player banned.
Anti-cheat can only stop so much. There will 100% be an anti-cheat but that cant stop everything. Theres also other rules other than just exploiting to be followed that would warrant a ban with video evidence.