4 ms·
A dumb question: Why are most of the container/infrastructure tools written in GoLang? Examples that come to my mind include Docker, Podman, nerdctl, Terraform
by maxloh 3y ago
A dumb question: Why are most of the container/infrastructure tools written in GoLang?
Examples that come to my mind include Docker, Podman, nerdctl, Terraform and Kubernetes.
Is there any obvious advantage that GoLang offers, making it so popular for building these tools?
- bombela 3y agoI think I can answer for Docker. The first prototype was written in Python, the company was a Python shop. The main reason for a rewrite in Go was to ride the popularity of Go that was growing at the time (2012). source: I was there.
- mardifoufs 3y agoIn hindsight, docker is probably much better off with Go, considering the use case. And I say that as someone who loves python and isn't too much into go!
- baby_souffle 3y ago> In hindsight, docker is probably much better off with Go, considering the use case. And I say that as someone who loves python and isn't too much into go! Same. I use docker to escape the versioning hell that is modern python. When you're trying to build a tool, the more self-contained the better.
- arccy 3y agowhen you run containers, you want to care as little about the underlying system as possible, and go makes it easy to be in its own little world. plus ecosystem effects of you can just use the packages of a different implementation for part of your code.
- fishpen0 3y agoKubernetes specifically is in go because google invented go and also invented Kubernetes. Their internal teams have a lot of go engineers due to the whole inventing it thing
- dmlittle 3y agoI believe the original Kubernetes proof of concept was written in Java
- quickthrower2 3y agoI think k8s came from Borg though which is pre-Go
- jacurtis 3y agoK8s was a generational iteration of Borg, but it was a full re-write with an emphasis on making it more universally usable and pluggable. > We've incorporated the best ideas from Borg in Kubernetes, and have tried to address some pain points that users identified with Borg over the years. Borg was written in C++, but only contained container scheduling, resource allocation and some service discovery. Many other features of what is now Kubernetes were built later and essentially "shimmed" onto Borg. Kubernetes was a re-write of Borg to rebuild many of its original features from the ground up using the lessons they had learned since originally building Borg. By this time, Go had been developed and was being actively used for many of these shims and supporting services surrounding Borg. Since the same team(s) were rebuilding Borg that had developed and maintained these other services, and because many of these shims and supporting services (which are already in Go) were being incorporated into Kubernetes, they decided to build the new version (which became Kubernetes) in Go. Sources: - https://kubernetes.io/blog/2015/04/borg-predecessor-to-kubernetes/ https://kubernetes.io/blog/2015/04/borg-predecessor-to-kuber... - https://storage.googleapis.com/gweb-research2023-media/pubtools/pdf/43438.pdf https://storage.googleapis.com/gweb-research2023-media/pubto...
- pjmlp 3y agoKubernetes is in Go, because a couple of Go advocates joined the team and pushed for a Go rewrite. It was originally written in Java. In fact, most Go users are outside Google, internally it is all about Java, Kotlin, Dart, C++ and Python, and now Rust as well. Kubernetes, gVisor and Android GPU debugger are probably the only major internal projects in Go.
- Yasuraka 3y agoEasiest language to (cross-)compile and distribute, stellar productivity to performance ratio, native (uncolored) concurrency, great networking capabilities in the stdlib. Imagine if you will Docker and Kubernetes written in any of the other popular languages.
- wavemode 3y agoI would argue system tools and utilities, CLIs and networking software are where Go shines the most. Rust is probably the only good modern alternative that is mature.
- rochak 3y agoI have a question for big companies building software in Rust. How are they able to find the talent? Unlike most other common languages, it is magnitudes more difficult to ramp up entry level new hires in Rust for the simple reason that Rust requires more than normal understanding of Computer Science. Is it just the C++ devs that wanna transition or have already transitioned to Rust that those companies can recruit?
- steveklabnik 3y ago> How are they able to find the talent? Unlike most other common languages, it is magnitudes more difficult to ramp up entry level new hires in Rust They have not found this to be true. https://news.ycombinator.com/item?id=38869786 https://news.ycombinator.com/item?id=38869786