I had a simple http server application written in golang. There are
three servers behind a vip load balance server.
At first I deployed the go server direct on 8080 port, this way the
incoming traffic directly hit the go server. The memory of my go server
soon increasing unreasonablely to 400~500M, and the response time become
very high, and many "timed out" "couln't connect to server" appeared. But
the cpu usage is very low. It seemed all the go routines were blocking
somehow, and the server was no longer accepting new requests.
Then I deploy a nginx server at each machine on 8080 port, then proxy
pass the request to my go server at 127.0.0.1:8081. This time the go server
works fine, memory usage is about 20M, cpu is about 5%, and rt about 5ms.
Because I can't debug on the online environment, I wonder what was
really happening in the first sulotion? Is there a known bug?
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.