
Google Professional Cloud Developer
Get started today
Ultimate access to all questions.
Your mobile game, deployed on Google Cloud services (Firebase, Firestore, and Cloud Functions), recently experienced HTTP 429 RESOURCE_EXHAUSTED errors during a usage surge when accessing the Firestore API. The application is now stable, but you need to quickly address this issue before an upcoming marketing campaign that may cause another surge. What steps should you take?
Your mobile game, deployed on Google Cloud services (Firebase, Firestore, and Cloud Functions), recently experienced HTTP 429 RESOURCE_EXHAUSTED errors during a usage surge when accessing the Firestore API. The application is now stable, but you need to quickly address this issue before an upcoming marketing campaign that may cause another surge. What steps should you take?
Explanation:
The HTTP 429 RESOURCE_EXHAUSTED error indicates that the Firestore API rate limits have been exceeded. To quickly mitigate this issue before an anticipated surge in usage, the best approach is to request a quota increase to allow for higher operational limits and modify the application code to implement exponential backoff for retries. Exponential backoff is recommended over fixed backoff because it helps to prevent the synchronization of retries, which can lead to recurring spikes in demand. While optimizing database queries is a good practice for long-term efficiency, it may not provide the immediate solution needed to address the upcoming surge in usage. Therefore, the most effective short-term solution is to combine a quota increase with the implementation of exponential backoff in the application code.