In most cases you need to check:
Ping test generally just test Servers.
The most comprehensive way to test the backend is to make an API which read a value from the database (without caching), by this way you will test the three main cores.
BUT this way is heavy on the backend especially if you have a lot of users (for example if there is in the same moment 100K users on your app, there will e 100K connection to DB and 100K API requests/Response, which could make the server unavailable for other users).
The way I overcome this the following:
- There is a public very small file on the server (not on DNS) that have the last time/date the backend was checked if it is functional.
- for every user that opens the app, the app will read this file.
- if it could not read it then the servers are down for sure.
- if the app could read the file, then it will check if the
Current time - last check time > 1 minute
then it will call an API CheckBackend
which will check everything and update the small file.
- by this method you will ensure that at max one full check is done every minute only, which is not that heavy on the server.