DEV Community

Discussion on: The importance of timeouts

Collapse
 
miensol profile image
Piotr Mionskowski • Edited

I did not want to imply that the integration point health check should cause the service to be shut down or restarted. The actual behaviour should obviously depend on how vital an integration point is for a service operation. For instance if a database is used in each an every API a service exposes it is rarely possible for the service to handle the failure gracefully and continue to function even in a semi healthy state.

My point wasn't about what and how we should detect and handle integration point(s) failures. IMHO it's much better if a service health is determined by thresholds set on runtime metrics instead of a simple health check. Having said that, a simple access check to a configured SMTP/HTTP server has it's place too and can often be used as a good miss-configuration detector.

The thing is that some integration points are checked by default by a framework that we use e.g. in Spring Boot with Actuator a JDBC connection is checked, SMTP server is checked just by including a relevant framework part. In other words even though the application code calls the SMTP server very rarely (e.g. only 1-2 times per day) the default framework health check code can call it much more often.