1

In my Java application, I am using a single object of RestTemplate for calling one HTTP endpoint. The resttemplate is a default one (instantiated by new RestTemplate() at the time of application start up) and so it doesn't has any connection pooling. Since the frequency of its usage is very less (about 50 calls per day), I am of the opinion that connection pooling should not be used as it will add to the overhead. Am I correct in my assumption?

Is there any standard use-case where HTTP connection-pooling should not be used?

Pratap
  • 655
  • 2
  • 10
  • 20
  • 1
    Put it another way, it probably won't *help.* 50 calls/day is 2.0833/hour, or about every 30 minutes, and any sensible server is going to close an idle connection long before 30 minutes. – user207421 Mar 22 '21 at 04:55
  • You will get the same overhead with or without it since new connections must be established anyway. [This answer](https://stackoverflow.com/a/50901789/2834978) has some info on that. – LMC Mar 23 '21 at 15:00

0 Answers0