How to Check Server-Availability on Cluster?

In a flow service, how do I check whether the other servers in a cluster are online/offline? Is there a built-in service I can use?

My Scenario:
I work on a clustered environment (servers a & b). In the flow service, I need to invoke pub.trigger:suspendRetrieval across all servers that are up at the time. suspendRetrieval has an option to ‘applyChangeAcrossCluster’, but I’ve seen from experience that when server b is down, the option does not apply successfully:

[ISS.0085.9203] Errors occurred while updating remote aliases (1 of 2 updates failed).

So I’d like to avoid this error by doing a preliminary check:
If server a & b are up
Then applyChangeAcrossCluster
Else
Do not applyChangeAcrossCluster … only on current server.

So if you can think of a way to check server availability, then do tell.

Invoke a known service on the other server as a sort of ‘ping’. There are a couple of ways to do this.

Remote invoke.
HTTP post to invoke a service.

I’ve used pub.date:currentDate as the service to invoke over HTTP.

As an aside, what issue is the presence of the error causing?

How do I remote invoke? What built-in service does the job? And how would I find out if it was successful or not? Try-catch block? Or does the service itself tell me?

If you’re not already familiar with remote invoke (it’s described in the Developer guide) then it’s probably not the way to go. Use an HTTP post instead.

Your ‘ping’ service would need to use a try-catch block. If the HTTP post returns the date/time string, it is successful. Otherwise, IS is off-line.