function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rcravenrcraven 

Callouts - @future usage limiations

Can anyone definatively define what the total and concurrent callout govenor limits are?

 

In the Apex developer's guide, under callouts, it says, "No more than 200 method calls per Salesforce.com license per 24 hours".

 

Lastly, I'm also thinking I need to be concerned about the concurrent callouts, as production organizations are limited to 25 concurrent API requests within a duration of 20 seconds or longer? 

 

 Thanks in advance, 

 -Rob 

 

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

"Limits are enforced against the aggregate of all API calls made by the organization in a 24 hour period; limits are not on a per-user basis. When an organization exceeds a limit, all users in the organization may be temporarily blocked from making additional calls. Calls will be blocked until usage for the preceding 24 hours drops below the limit." (Source: http://na1.salesforce.com/help/doc/en/integrate_api_rate_limiting.htm)

 

Here's what this means specifically:

 

 

  • All users share the same limit. If one user is using 50% of your API calls, the other 50% is available for your remaining users. As an example, if you have enough licenses to have 1000 callouts per day, and one user uses 500 of them in that time, the other four users have an aggregate total of 500 remaining. If two users are using this much, the other three users can't use the feature at all.
  • Rate Limits are applied to virtually every facet of Salesforce usage. Most of these limits are applied in the form of a rolling window mechanism.  This means that, if you had a limit of 1000 calls per day, you could make 41.67 calls per hour on average without a problem, but if you had a near-capacity rate of usage and you have a burst that exceeds this value, you could be limited for a period of time equal to that usage. For example, if you had a one-hour burst of 166 calls with an average usage of 41 calls per hour (24 hours a day), somewhere in the 20th hour after this burst, you would experience a rate limit for approximately four hours where you could not make a callout.
  • Concurrent requests only apply if the calls are taking over 20 seconds. Most callouts on the web rarely run longer than a few seconds, but this could be a conceivable concern if you had a service that returned data slowly (i.e. limited bandwidth, high server loads, or simply takes a long time to complete each request). Many popular services, such as Twitter, make it a point to return an error message if any call takes more than approximately 10 seconds (not sure of the timing, but I know it exists). Using most online services will never run into this issue, but a custom-developed service (say, a web service designed in PHP specifically for a single organization) might run into this limit under high loads. Analysis of the service's performance and typical load would be required to consider if the concurrent limits would be an issue.