Query Optimization and API Throttling

We track the performance of Facebook pages and messages for several clients, and we have some questions regarding the high processor intensity and too many calls for messages / comments - according to what is reported in the developer console (Insights β†’ Developer β†’ Actions and Errors) . The documentation is somewhat unclear regarding the limitations and limitations for the Graph API, and we just wanted to make sure that we have the right understanding of what resources we have.

We are working on optimizing our software and queries to reduce the error rate and the number of queries. In connection with this work, we have several questions:

  • We changed the use of FQL queries instead of the usual Graphics API queries to retrieve Post messages, which allows us to receive comments for several messages in the query. This has led to a significant reduction in the number of requests. We use a request with page_id IN (PAGE_ID_1, PAGE_ID_2, ....). Will this increase the processor intensity compared to the usual graphical API?

  • We also implemented request throttling at our end to ensure that our requests are evenly distributed over time, rather than in large queues. For comments on the pages, we guarantee that the maximum number of requests should not exceed 300 in 10 minutes. In other words, we limit the number of page comment requests to 0.5 per second or 30 per minute. Is it still high?

  • Once the request limits are exceeded, we assume that this is for the access token, and not for the APP ID? Therefore, if one of our customers overloaded resources, will our APP continue to work on behalf of our other customers who have different access tokens?

  • In the developer console, on the page Insights β†’ Developer β†’ Activity and Errors for our application, the Throttling API table has time above it. For example, 1 hour, 14 minutes. What does this time indicate, how often is this table updated, and how many years is the date?

  • We get a small number of errors with a response code of 500. Are these errors a typical result of exceeding the requirements and / or CPU limits? If not, are there any ways to determine what actually causes them, and if there is something we can do at our end to fix this?

We will be grateful for the input and confirmation of our assumptions.

+6
source share
1 answer

Some answers to your questions:

  • The Facebook limit for a graphical API request is 600 requests in 600 seconds ... BUT batch requests are considered ONE REQUEST for a request in a package ... I think the FQL limits are the same ...
  • This restriction is for one IP address and one access token, if you have many tokens and / or IP addresses, you can configure this limit
  • I have no example, but when you violated the speed limit, the error message is something like "too many requests" and not a 500 error ... I don’t know what could lead to this in your case.

Some questions that I don’t understand: - When you talk about "processor intensity", do you mean on your side or the side of the FB? On the FB side, I never see such a limit, the only thing is 600 req / 600 sec ...

For more information: Facebook data rate limit chart and batch requests What is the Facebook API call limit?

+2
source

All Articles