Go Icon

Go

Go is a programming language built to resemble a simplified version of the C programming language.
163 Stories
All Topics

Go robustperception.io

Optimising startup time of Prometheus 2.6.0 with pprof

Brian Brazil: The informal design goal of the Prometheus 2.x TSDB startup was that it should take no more than about a minute. Over the past few months there’s been reports of it taking quite a bit more than this, which is a problem if your Prometheus restarts for some reason. Almost all of that time is loading the WAL (write ahead log), which are the samples in the last few hours which have yet to be compacted into a block. I finally got a chance to dig into this at the end of October, and the outcome was PR#440 which reduced CPU time by 6.5x and walltime by 4x. Let’s look at how I arrived at these improvements. I’ve been meaning to get more familiar with pprof, the Go profiling tool, as my job revolves around working on and around Go microservices. My team has been able to see the impact of the Go experts who can quickly find issues buried in a stack of profiles collected on a service. Brian’s post is a great example of 1) identifying the an issue, 2) diagnosing said issue and 3) observing the implemented improvements using pprof. His parting paragraph is particularly insightful, specifically: I did spend quite a bit of time pouring over the code, and had several dead ends such as removing the call to NumSamples, doing reading and decoding in separate threads, and a few variants of how the processWALSamples sharding worked Profiling and optimization is a mix of knowing your codebase and being able to identifying false leads. A tool like pprof is invaluable when identifying both issues and improvements in a measurable way.

read more

Johan Brandhorst grpc.io

The state of gRPC in the browser

Front-enders should check this out! Johan Brandhorst reviews the history of gRPC in the browser, the state of things today, and thoughts on the future of gRPC-Web. gRPC-Web is an excellent choice for web developers. It brings the portability, performance, and engineering of a sophisticated protocol into the browser, and marks an exciting time for frontend developers! So far the benefits have largely only been available to mobile app and backend developers, whilst frontend developers have had to continue to rely on JSON REST interfaces as their primary means of information exchange. However, with the release of gRPC-Web, gRPC is poised to become a valuable addition in the toolbox of frontend developers.

read more

Kubernetes tilt.build

Local Kubernetes development without the stress

Tilt makes it possible to develop all your microservices locally in Kubernetes while collaborating with your team. You define a Tiltfile that describes how your services fit together (which is supposed to be pretty straight forward if you already have a Dockerfile and a Kubernetes config), then share it with your team. Everyone runs tilt up and the app is up and running on their localhost. No more “it worked on my machine” – everything runs in containers so the right dependencies are always there. Tilt updates with container optimization tricks & best practices, so that even complex projects update in seconds.

read more

adrienjt admiralty.io

Introducing Multicluster-Controller

Last week, Admiralty open-sourced multicluster-controller, a Go library for building hybrid and multicloud Kubernetes operators. It is the equivalent of operator-sdk or kubebuilder, but for multiple clusters. It is actually a thin layer around parts of controller-runtime, the library that powers kubebuilder. It can be used to control custom resources (defined by CRDs) across clusters.

read more

Command line interface github.com

A tool for writing Bash pipes with instant live preview

Meet up a.k.a. the Ultimate Plumber: The main goal of the Ultimate Plumber is to help interactively and incrementally explore textual data in Linux, by making it easier to quickly build complex pipelines, thanks to a fast feedback loop. This is achieved by boosting any typical Linux text-processing utils such as grep, sort, cut, paste, awk, wc, perl, etc., etc., by providing a quick, interactive, scrollable preview of their results.

read more

Go blog.golang.org

Which companies are using Go and how they are using it?

If you want to see what the landscape is of companies who are using Go, spread the word and encourage folks to participate in the 2018 Go company questionnaire. On the Go blog: Please help by participating in a 7-minute company questionnaire. Who? If you are in a position to share details like “company name,” “if your company is hiring Go developers,” and “reasons your team or company adopted Go” then please help us by taking this company questionnaire. We only need one response per company (or per department for larger companies). If you aren’t the right person, please forward this onto the right person at your company.

read more

Go github.com

A high-performance PHP app server, load balancer, and process manager

RoadRunner is an open source (MIT licensed), high-performance PHP application server, load balancer and process manager. It supports running as a service with the ability to extend its functionality on a per-project basis. RoadRunner is written in Go, and can be used to replace the class Nginx+FPM setup, boasting “much greater performance”. I’d love to see some benchmarks. Better yet, I’d love to see someone use this in production for a bit and write up their experience.

read more

Cassandra Salisbury blog.golang.org

Portable cloud programming with Go cloud

This post covers how Go Cloud works, how it got started, and how to get involved. Eno Compton and Cassandra Salisbury write on the Go blog: Today, the Go team at Google is releasing a new open source project, Go Cloud, a library and tools for developing on the open cloud. With this project, we aim to make Go the language of choice for developers building portable cloud applications.

read more

Carolyn Van Slyck carolynvanslyck.com

Building Go from source

This is how you accomplish step 1 to becoming a Go contributor. Before we can become Go contributors, the very first step is being able to build Go from source. I followed the official doc and filled in the blanks a bit to figure out how to get everything working. This post is part of a series from Carolyn Van Slyck called Adventures in Gopher Source. The goal of the series is “for more of the gopher community to become upstream Go contributors.”

read more

Go github.com

A zero-config tool to make locally-trusted dev certs with any names you'd like

A common discrepancy between our dev and prod environments is that prod uses HTTPS while dev is stuck on HTTP because reasons: Using certificates from real CAs for development can be dangerous or impossible (for hosts like localhost or 127.0.0.1), but self-signed certificates cause trust errors. Managing your own CA is the best solution, but usually involves arcane commands, specialized knowledge and manual steps. I’ve considered getting my dev environment on HTTPS but have always stopped at “Managing your own CA”. 🙅‍♂️ Not gonna do it. But! mkcert automatically creates and installs a local CA in the system root store, and generates locally-trusted certificates. mkcert currently supports macOS and Linux. Windows support coming next.

read more

Go github.com

Fo = Functional Go

Go already supports many features that functional programmers might want: closures, first-class functions, errors as values, etc. The main feature (and in fact only feature for now) that Fo adds is type polymorphism via generics. Generics encourage functional programming techniques by making it possible to write flexible higher-order functions and type-agnostic data structures. People have been asking for Generics in Go since the beginning of time. (2009) At this time, Fo should be thought of primarily as an experiment or proof of concept. It shows what Go looks like and feels like with some new language features and allows us to explore how those features interact and what you can build with them. Perhaps Fo’s author is hoping that enough traction/excitement around this project will convince the Go team to add Generics to the language.

read more

Chris James quii.gitbook.io

Learn Go with tests: HTTP server

Chris James: Write a simple web server in Go with test driven development. Learn how to use mocking to let you break the problem down into small iterative chunks. All using standard library, source code is available to read. The linked page is a sub-section of the Learn Go with tests GitBook. Do you enjoy TDD and want to learn Go? Or do you enjoy Go and want to learn TDD? Either way, this looks like a great (WIP) resource.

read more

0:00 / 0:00