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.