query on the time taken for rest api in kubernetes environment

I have a REST API running in a Kubernetes namespace. This REST API will in turn call another REST API on the same Kubernetes namespace. Sometimes the calls take within 10 milliseconds. Someother times it takes more than a second to respond. How can I check why its taking more than 500 milliseconds in some instances?

The REST API is developed using SpringBoot. I have also done good amount of performance testing and monitored the same using JCMD tool, Visual VM tools. I did not find significant issue with the REST API.