Page 1 of 1

GENERAL_QUOTA_EXCEEDED and GENERAL_RATE_LIMIT_EXCEEDED

Posted: Fri May 13, 2022 9:00 am
by Bernd Welter
Cheers,

I've been asked for the difference between GENERAL_QUOTA_EXCEEDED and GENERAL_RATE_LIMIT_EXCEEDED.

Here is some info
  • GENERAL_QUOTA_EXCEEDED: this occurs whenever your periodical budget of test transactions is exceedeed. If you have a regular developer agreement we can remove this constraint from your account settings.
  • GENERAL_RATE_LIMIT_EXCEEDED: this message appears if a token sends too many transactions of a given type per minute. This consumption behaviour is seen critical in terms of denial-of-service. Technically this condition requires "the token" to return to the services later. Alternative approach: use mutltiple tokens to spread the workload:
    • Strategy 1 : Use round robin: easy to apply but maybe not as efficient as other strategies.
    • Strategy 2: Some parties - especially partners - are running multiple instances of their application: They can uses an individual token per instance. This would limit the errors to those users/instances, that still trigger transactions to fast.
    • Strategy 3: Others can apply individual tokens per context, e.g. per vehicle that is tracked or per end user (e.g. if you are hosting a web application where each logged in user runs his own token).
To create API token's automatically you can use the Account API. Using various tokens also enables you to disable a specific user if needed.
:!: In general it is recommended that you prepare your individual token strategy at design time as early as possible. This will protect you from running into issues if you add more and more users / contexts (if you are too successful ;-) ).
:!: Depending on the strategy you've chosen you can also benefit from the Usage Reports (via shop frontend or also via API calls: Account API.getUsage())

Frequently asked questions?
  • Why does PTV not just increase the rate limit definitions? Can't PTV just define rate limits per account? - Well, the rate limits have been invented to protect the infrastructure. Opening these limits on a generic base would reduce the security.
  • Looks like the maximum number of tokens per account is 1'000. Can we get more than 1'000 tokens? - If you need more than 1'000 tokens get back to us. We will definetly find a solution for this :D
Further info (such as the current rate limits) is available in the FAQ section.
Best regards,
Bernd