注:この質問は、同じシナリオを提示する一連の質問の一部です。シリーズの各質問には、述べられた目標を達成する可能性のある独自の解決策が含まれています。一部の質問セットには複数の正しい解決策がある場合がありますが、他の質問セットには正しい解決策がない場合があります。 このセクションの質問に回答した後は、その質問に戻ることはできません。その結果、これらの質問はレビュー画面に表示されません。 Azure StorageBLOBデータを処理するためのHTTPトリガーAzureFunctionアプリを開発します。アプリは、blobの出力バインディングを使用してトリガーされます。 アプリは4分後もタイムアウトし続けます。アプリはBLOBデータを処理する必要があります。 アプリがタイムアウトせず、BLOBデータを処理しないようにする必要があります。 解決策:HTTPトリガーペイロードをAzure Service Busキューに渡して、キュートリガー関数で処理し、HTTP成功応答を即座に返します。 ソリューションは目標を達成していますか?
正解:A
Large, long-running functions can cause unexpected timeout issues. General best practices include: Whenever possible, refactor large functions into smaller function sets that work together and return responses fast. For example, a webhook or HTTP trigger function might require an acknowledgment response within a certain time limit; it's common for webhooks to require an immediate response. You can pass the HTTP trigger payload into a queue to be processed by a queue trigger function. This approach lets you defer the actual work and return an immediate response. Reference: https://docs.microsoft.com/en-us/azure/azure-functions/functions-best-practices