ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Excessive Message Spam (https://www.esoui.com/forums/showthread.php?t=5239)

sirinsidiator 10/31/15 05:19 AM

Excessive Message Spam
 
I am currently playing around with guild member notes and as expected keep getting kicked for message spam when I update them too often in a short time.
Now I am wondering if there is any information on how often we can call certain functions before we get kicked in order to prevent calling it too fast.
The EVENT_SPAM_WARNING does not seem to fire in this case and there is no function like GetTradingHouseCooldownRemaining to tell us how long we should wait between calls to SetGuildMemberNote. There is not even any info which functions do have a message limit.

After some trial and error I arrived at waiting 10 seconds after EVENT_GUILD_MEMBER_NOTE_CHANGED is received before running the next SetGuildMemberNote, but this is all pretty fuzzy and I wonder if it can be faster than that. Maybe it would be better to make x calls in y seconds and then wait z second before doing the next batch?

I am really curious how this is handled internally.
Is it a simple token-bucket algorithm? Is it something else?
It would also be good to know if the limit is independent for each function, or if there is a global counter. Right now I only tested it when doing nothing besides calling SetGuildMemberNote, but ultimately I would like to run this during normal gameplay and it would be bad if I get kicked because calls to other functions interfered with it.

Once this is all cleared up I'd like to gather all there is to know about message rate limits on a wiki page.

ZOS_ChipHilseberg 11/02/15 09:13 AM

It is per message to the server and implemented as a leaky bucket so it can tolerate some burst.

sirinsidiator 11/03/15 09:19 AM

Thanks for you reply. It answers some questions.
Still have to figure out how often I can call it safely without getting kicked.

Provision 07/22/18 05:08 AM

Do you know the rate limit ?

sirinsidiator 07/22/18 07:07 AM

There are different limits for different API functions from what I have found out. Changing guild notes etc has a much lower limit than sending map pings for example.

As for the map pings, I did some extensive tests on the PTS and found that the limit is 2 calls per second over a prolonged time. But that is a gross oversimplification. Actually it is a bit more complicated. In the latest version of LibMapPings I added a leaky bucket implementation which drops any pings that would go over the limit and get you kicked.

But that implementation also doesn't account for the burst that Chip mentioned and there is also a different limit for in and out of combat:



As long as you stay below the curve, you won't get kicked and in the second image you can see that 2 pings per second is infinitely sustainable.

In general it would be great if ZOS could implement some functionality to prevent getting kicked from the game on the client side. For example a function to get the cooldown for the different functions and also warning events that a call has been dropped if an addon sent too many calls, instead of just dropping the player to the login screen.

Provision 07/22/18 03:44 PM

Thanks.

Lua Code:
  1. /script for i = 1,24 do SlotSkillAbilityInSlot(4, 4, 2, 3) end

I get a warning arround ~20 or 30.


All times are GMT -6. The time now is 11:09 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI