Azure Database for MySQLインスタンスに接続するASP.NET Coreアプリケーションを開発し、デプロイします。 データベースへの接続が断続的に切断されるようで、アプリケーションコードは接続障害を適切に処理していません。 一時的な接続エラーは、コード内で再試行処理を実装することで対処する必要があります。 この目標を達成するための3つの方法は何ですか?それぞれの正解は、解決策の一部を示しています。 注:正解ごとに1ポイントが加算されます。
正解:A,C,E
The first and second case are fairly straight forward to handle. Try to open the connection again. When you succeed, the transient error has been mitigated by the system. You can use your Azure Database for MySQL again. We recommend having waits before retrying the connection. Back off if the initial retries fail. This way the system can use all resources available to overcome the error situation. A good pattern to follow is: - Wait for 5 seconds before your first retry. - For each following retry, the increase the wait exponentially, up to 60 seconds. - Set a max number of retries at which point your application considers the operation failed. Reference: https://docs.microsoft.com/en-us/azure/mysql/single-server/concepts-connectivity