Using 97 fewer cores thanks to PGO

#​507 — May 14, 2024

Unsub  |  Web Version

Go Weekly

Reclaiming CPU for Free with PGO — We’ve previously featured Dolt’s experiences with PGO but Cloudflare has been experimenting and benefiting from Go 1.20+’s profile-guided optimization too. At Cloudflare’s scale of running Go-based services across thousands of cores, the end result is quite striking.

Colin Douch (Cloudflare)

ok Considered Harmful?“Just like there’s an unwritten law that every error variable in Go must be named err, there’s an unwritten law that every map existence variable in Go must be named ok.” But Zach thinks we can, and should, look at doing better.

Zach Musgrave

Stytch: Auth0 Alternative for AuthN, AuthZ, Fraud Prevention — Use Stytch for enterprise-grade multi-tenant B2B auth with SSO, RBAC, and SCIM. Use pre-built UIs, go headless, or integrate directly with the API. Plus, Stytch has device fingerprinting built-in to detect bots and prevent abuse. Get started free.

Stytch sponsor

🗣️ Do Gophers Really Tend to Build Everything From Scratch? — Over on Reddit, a developer new to Go wondered why Go has few large scale frameworks and whether we tend to just build everything from scratch. The top response sums up a typical Go approach well – we have lots of great libraries, and Go makes it easy to compose them together. Full thread.

Reddit

QUICK BITS:

The Notifier Pattern for Apps That Use Postgres — Brandur is a big fan of Postgres’s built-in pub/sub features.

Brandur Leach

Building a Web App with Go and React — The goal of this series seems to be to show off JetBrains’ GoLand IDE, with less focus on the design of the app itself. This does not, however, mean it’s not useful to see how the parts come together.

Ryan Peden (JetBrains)

Create a DNS Resolver with Go — There are plenty of ways to do this quickly, but if you want to dig into the packets and learn how it works, why not?

Domenico Luciani

Product for Engineers: A Newsletter Helping Flex Your Product Muscle — Subscribe to get curated advice on building great products and best practices of top startups.

PostHog sponsor

How I Made My GitHub Profile README Dynamic — There’s no Go here, alas, but a neat demo of how it’s not too tricky to give your GitHub profile extra flair by pulling in blog posts or other info.

Duy Ng

📺 Build Your Own Distributed System Using Go – A talk from GopherCon 2023 that’s just been published. Philip O'Toole

📄 Using the crypto/aes and crypto/cipher Packages Aran Wilkinson

📄 A Basic Example of Using DuckDB from Go Joseph Jude

📄 Creating a More Sustainable Model for oapi-codegen in the Future Jamie Tanna

📺 A Nine Hour Go Course for Beginners Lane Wagner

🛠 Code & Tools

Chapar: An In-Development API Testing Tool — Built in Go using the Gio UI library, Chapar is designed for testing both HTTP and gRPC-based APIs in a slightly Postman-like fashion. It’s still under development but is ready to try out, says the author. GitHub repo.

Mohsen Mirzakhani

hnsw: In-Memory HNSW Vector Indexing for Go — A library providing a simple, in-memory vector database. HNSW stands for Hierarchical Navigable Small Worlds and is a way of indexing vectors by way of a multi-layer graph.

Ammar Bandukwala

📰 Classifieds

Your fastest path to production. With Render you can Build, deploy, and scale your apps with unparalleled ease – from your first user to your billionth.

📅 Moar Serverless!! 2024 is a free, one day online event taking place on May 23 featuring several speakers sharing the latest news and technologies for building serverless solutions.

Actionlint: Static Checker for GitHub Actions Workflow Files — GitHub Actions workflow files are notoriously tricky to get right, so this could be helpful. You can also try it online via this playground.

rhysd

go-size-analyzer: Analyze the Size of Dependencies in Compiled Go Binaries — We linked to this handy tool a few weeks ago, but it’s had a significant 1.0 update with support for a new terminal-based view of just what all those bytes are being used for in your binaries.

Zxilly

  • GoReleaser 1.26 – Build/release binaries for multiple platforms. It's anticipated to be the last minor v1 release prior to an eventual v2.

  • UUID 5.2 – RFC-9562-compliant UUID generation library. Now with updates to UUID v6 and v7 to match new specs.

  • Go Open

Created 8mo | May 14, 2024, 3:50:05 PM


Login to add comment