UDP API - PING interval

Want to help out? Need help accessing the AniDB API? This is the place to ask questions.

Moderator: AniDB

Locked
ncmaothvez
Posts: 8
Joined: Mon Sep 12, 2005 5:37 pm

UDP API - PING interval

Post by ncmaothvez »

Hi,

Is the 'exception' to the 5 minute PING interval rule discussed here still OK to use or is the 5 minute rule strictly enforced nowadays?

Just want to check before I do something potentially stupid :wink: .

/N
PetriW
AniDB Staff
Posts: 1522
Joined: Sat May 24, 2003 2:34 pm

Post by PetriW »

Just follow the documentation:
http://wiki.anidb.info/w/UDP_API_Defini ... ng_Command

Flood Protection
To prevent high server load the UDP API server enforces a strict flood protection policy.

Short Term:
A Client MUST NOT send more than 0.5 packets per second.
The server will start to enforce the limit after the first 5 packets have been recieved.

Long Term:
A Client MUST NOT send more than one packet every 30 seconds over an extended amount of time.
An extended amount of time is not defined. Use common sense.
Aka, ping seldom enough that you don't send more than 1 packet every 30 seconds over an extended amount of time. If that's every 2 minutes, have at it!
ncmaothvez
Posts: 8
Joined: Mon Sep 12, 2005 5:37 pm

Post by ncmaothvez »

Thanks PetriW! That's good news.

I think the documentation is a bit contradicting though; the last paragraph before 'Flood Protection' ends with:
Please do not send pings more often then once every 5 minutes and only on connections via NAT routers or if the user has explicitly enabled regular keepalive pings via a configuration setting (default setting should be OFF).
/N
PetriW
AniDB Staff
Posts: 1522
Joined: Sat May 24, 2003 2:34 pm

Post by PetriW »

Keep pings to 5+ minutes if you need them, if it's a problem make a special setting for those few people who need pings more often, otherwise keep it to 1 command per 30 seconds.
Locked