A health-check endpoint should be implemented as its own flow with a dedicated HTTP Listener configuration and port, isolated from the API implementation it is verifying. This decoupling means the health check can report status independently of the business logic's connection pool, threads, and listener state, so monitoring is reliable even if something specific to the main API listener is degraded, and it avoids exposing operational endpoints alongside customer-facing payment traffic. Sending live customer payment data or piggybacking the check on the same listener/port as the API itself would either be unsafe or would not give an independent signal of availability.
Community Discussion