3

To check service availability we have added ping test but it does not check actual core functionality of the application. It just ping the server and return the response.

Is there any way to where we can check service core functionality is working over the ping test?

Prashant kamble
  • 259
  • 2
  • 4
  • 11

2 Answers2

0

In most cases you need to check:

  • Database
  • APIs
  • Servers

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.
user16930239
  • 6,319
  • 2
  • 9
  • 33
0

Usually, applications use from ports. Instead of ping you can use telnet request to IP:Port. Like this:

telnet test.netbeez.net 20011

Also, you should visit here for to get more information https://netbeez.net/blog/telnet-to-test-connectivity-to-tcp/

Tural Rzaxanov
  • 783
  • 1
  • 7
  • 16