visola / go-proxy

A proxy to help with local development in the microservices world
MIT License
18 stars 2 forks source link

Reuse http.Client to avoid issue with DNS lookup #50

Closed visola closed 4 years ago

visola commented 4 years ago

During high volume of requests scenario, I've noticed that creating a new HTTP Client for each request was causing the following error:

dial tcp: lookup localhost: no such host

Reusing the http.Client seems to fix this issue.