go vs java garbage collector for micro-services

3/27/2019

I was told that Go's garbage collector does not cause interruptions in the program unlike Java's garbage collector which can cause a program to pause. This makes Go's much superior for latency sensitive micro-services.

I tried understanding this but not being an expert, I did not. I found some stuff like - sub 10ms latency https://groups.google.com/forum/?fromgroups#!topic/golang-dev/Ab1sFeoZg_8

In general, are there reasons where Go is a superior choice for designing micro-services running on docker/kubernetes compared to Java (I know that until Java 9, Java only understood memory and cpu resources at a host level. which meant that it made assumptions about sizing thread pools and memory allocations and Docker wouldn't always provide these resources).

-- Illusionist
docker
go
kubernetes

1 Answer

3/27/2019

10ms in Go GC is outdated.

enter image description hereLast time GC was improved in Go 1.10 (Feb 2018)

Regarding STW:

We now have an objective of 500 microseconds stop the world pause per GC cycle. Perhaps a little sandbagging here.

See https://blog.golang.org/ismmkeynote

-- Nik
Source: StackOverflow