Avoiding Memory Leak in Golang APIby@imantumorang
24,217 reads

Avoiding Memory Leak in Golang API

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Kurio is releasing Golang's main Golang API into production. Kurio has struggled for a long time with our main API, that always always down and returning a long response to our mobile-apps and sometimes causing our API can’t be accessed. We use a customized http.Client, instead using the default one from the http’s package, and use some config based on our need. If we want to reuse our connection pool to another service, we must read the response body, and close it. This helps avoid memory leak in our server.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Avoiding Memory Leak in Golang API
Iman Tumorang HackerNoon profile picture

@imantumorang

Iman Tumorang

Software Engineer


Receive Stories from @imantumorang

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!