paint-brush
Avoiding Memory Leak in Golang APIby@imantumorang
24,279 reads
24,279 reads

Avoiding Memory Leak in Golang API

by Iman Tumorang10mJanuary 9th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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
Iman Tumorang

Iman Tumorang

@imantumorang

Software Engineer

Learn More
LEARN MORE ABOUT @IMANTUMORANG'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Iman Tumorang HackerNoon profile picture
Iman Tumorang@imantumorang
Software Engineer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here