I have a simple spring boot application and a controller class. A simple method inside my controller :
@GetMapping("/heartbeat")
public ResponseEntity<String> heartbeat() {
return new ResponseEntity<>("success", HttpStatus.OK)
}
I am calling this method from Postman, I can see the time it takes to complete this method is different in every call.
For example 28ms, 70ms, 15ms ...
It is ok if we talk about milliseconds but I have noticed that the more complex the web service is, the bigger the difference. Sometimes the difference is even seconds.
I suppose this is normal but what is causing this?