Health Probes

Mansi Gusain 165 Reputation points
2024-11-26T10:34:21.3866667+00:00

Hello all, there is configuration for health probes for the azure container apps using terraform. Can someone please explain what the period seconds signify? like suppose for startup I define - 10 and for readiness- 10 and then liveness - 5 this means that is the startup supposed to run in every 10 seconds and then what will the timeout do?

I have gone through the documentation but all state the same meaning, it will be helpful if someone can actually help with the meaning and actual implementation of these terms. and how setting one will impact the other?

Azure Health Data Services
Azure Health Data Services
An Azure offering that provides a suite of purpose-built technologies for protected health information in the cloud.
172 questions
0 comments No comments
{count} votes

Accepted answer
  1. Khadeer Ali 1,400 Reputation points Microsoft Vendor
    2024-11-27T17:24:45.8866667+00:00

    Hi Mansi Gusain,

    Welcome to the Microsoft Q&A Platform! Thank you for reaching out regarding your query on Health Probes.

    To better understanding the period seconds and timeout lets take an example :

    Let's say your application takes 30 seconds to start. Here’s how the probes will work:

    Startup Probe:

    Period Seconds: 10

    Timeout Seconds: 3

    The startup probe will check the /startup endpoint every 10 seconds. If the application doesn't respond within 3 seconds, it will consider the startup check failed.

    At 0 seconds, it checks /startup and gets no response (because the app is still starting).

    At 10 seconds, it checks again and still gets no response.

    At 20 seconds, it checks again and still gets no response.

    At 30 seconds, it checks again and this time the application responds successfully. The startup probe passes.

    Readiness Probe:

    Period Seconds: 10

    Timeout Seconds: 3

    The readiness probe will check the /readiness endpoint every 10 seconds. If the application doesn't respond within 3 seconds, it will consider the application not ready to handle requests.

    At 30 seconds, it checks /readiness and gets a successful response. The application is ready to handle requests.

    At 40 seconds, it checks again and gets a successful response.

    This continues every 10 seconds to ensure the application remains ready.

    Liveness Probe:

    Period Seconds: 5

    Timeout Seconds: 3

    The liveness probe will check the /liveness endpoint every 5 seconds. If the application doesn't respond within 3 seconds, it will consider the application unhealthy and restart it.

    At 30 seconds, it checks /liveness and gets a successful response.

    At 35 seconds, it checks again and gets a successful response.

    This continues every 5 seconds to ensure the application remains alive.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.