I created a simple service that performs 4 HTTP calls and 4 db calls to collect some data and pass it to the HTTP response as JSON.
As I start the application (native, no docker), I see it consumes 7MB, sometimes 15MB sometimes 30MB. Good.
As I start loading testing it, sending 1 request every 10 milliseconds, in total 100 requests.
I noticed the memory consumption goes to 200MB right away. Then after 5-6 more tests to 400MB. (As much is Spring Boot version of it takes).
Question is: is it expected to be like that?
Should it be trying be minimalist (for the native v of it) about the memory and clean after itself, at least after n minutes or so? Is there are settings for that?