Go is a compiled, concurrent, garbage-collected, statically typed language developed at Google. According to Rob Pike, one of the creators of Go, the language was designed by and for people who write - and read and debug and maintain - large software systems.
Go is an excellent programming language for engineering large software projects. Some of the most popular container technologies used in DevOps like Docker and Kubernetes are written in Go.
It is also loved by the Dev community. According to 2020 developer survey by Stackoverflow, Go stands at 5th position in the list of of most loved programming languages and at 3rd position in the list of most wanted languages to learn.
So what are some of the characteristics of Go programming language that makes it great for DevOps.
Go programs are statically linked
When you compile a Go program, everything is included as a single binary and there are no external dependencies that will need to be installed on the targeted machine that the Go program is intended to run on. And this makes the deployment of Go programs really easy.
Build and deployment of Go programs
Even though Go is a compiled language, it compiles directly into machine code as opposed to intermediate object code which is required for Java. Go was designed to be extremely fast. Here’s a small benchmark game comparing Go vs Python.
Go is platform independent
Binary executables of Go programs can be produced for any platform like Windows, Linux and macOS. In order for a binary to be supported on the different operating systems all it takes is setting two environment variables: $GOOS
, $GOARCH
.
Extremely performant language
Go program has fast compilation times and fast runtimes with lower resource usage like CPU and memory especially when compared to language like Python. As the compiler fails the run if there are unused imports, the compilation time is short. And as the code is compiled to machine code, it also executes fast.
Availability of Standard libraries
Unlike Python which often requires the use of third party libraries to implement a particular Python program, the Go programming language has a standard library which includes a lot of built-in functionality that you will need as a DevOps engineer.
This includes functionality like file processing, HTTP web services, JSON processing, native support for concurrency and parallelism as well as built-in testing modules.
Currently building SigNoz - an open-source alternative to DataDog, New Relic, etc. 💙
SigNoz's backend is written in Go.
SigNoz helps developers monitor applications and troubleshoot problems in their deployed applications. Check out our GitHub repo👇
SigNoz / signoz
SigNoz is an open-source observability platform native to OpenTelemetry with logs, traces and metrics in a single application. An open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool
Monitor your applications and troubleshoot problems in your deployed applications, an open-source alternative to DataDog, New Relic, etc.
Documentation • ReadMe in Chinese • ReadMe in German • ReadMe in Portuguese • Slack Community • Twitter
SigNoz helps developers monitor applications and troubleshoot problems in their deployed applications. With SigNoz, you can:
👉 Visualise Metrics, Traces and Logs in a single pane of glass
👉 You can see metrics like p99 latency, error rates for your services, external API calls and individual end points.
👉 You can find the root cause of the problem by going to the exact traces which are causing the problem and see detailed flamegraphs of individual request traces.
👉 Run aggregates on trace data to get business relevant metrics
👉 Filter and query logs, build dashboards and alerts based on attributes in logs
👉 Record exceptions automatically in Python, Java, Ruby, and Javascript
👉 Easy…
Top comments (3)
i like golang for tooling, but for low latency it's still not ready yet. as it's still have GC. if there's no docker and k8s i think it won't survive. but right now a lot of tooling already created for that.
It's great to have more choices. golang compiler is fast, but the code might not be optimized. and it's from google, so the progress is bit slow. angularjs, flutter etc. I just worry if golang doesn't have a foundation that take care of that.
cpp has iso, java has openjdk, rust have foundation, .net have foundation.. so let's see
One point which comes to mind is that Kubernetes ( github.com/kubernetes/kubernetes) is written primarily in Go. So, if you want to understand the internals of k8s, knowing Go would come in very handy.
Also, many tools like Prometheus ( github.com/prometheus/prometheus) which devops engineers user are in Go
The only reason is ultimately because its used by Google and has a good marketing budget unlike less known languages like D.