Go scheduler’s job is to distribute runnable goroutines over multiple worker OS threads that runs on one or more processors. In multi-threaded computation, two paradigms have emerged in scheduling: work sharing and work stealing.
Work-sharing: When a processor generates new...
Prelude If you want to put this post in some better context, I suggest reading the following series of posts, which lay out some other fundamental and relevant design principles:
Language Mechanics On Stacks And Pointers Language Mechanics On Escape Analysis Language Mechanics On...
One of the gotchas of using gRPC is that it was not designed to transport large messages in one chunk. The default max message size is slightly arbitrarily set at 4MB today, and while it is possible to configure, that kind of behaviour might lead to a slippery slope scenario of e...
Sometimes when you’re writing a server, you’ve got a function that consumes a lot of memory while running, or some other resource, and you might be worrying that a sudden burst of requests could crash the server, since gRPC by default will just spawn another goroutine...
Recently I found myself wondering how I was going to test my new GopherJS gRPC-Web bindings. Writing tests was something I had been waiting with until I had something working, mostly because I had no idea how I was going to meaningfully test GopherJS code that relies on interacti...
Usually at work and at home we use different Git name/email pairs, or even per project. Pushing with correct email guarantees that your commits will be authored with a correct user identity.
Go 1.9 is introducing profiler labels, a way to add arbitrary key-values to the samples collected by the CPU profiler. CPU profilers collect and output hot spots where the CPU spent most time in when executing. A typical CPU profiler output is primarily reports the location of th...
I’ve been working with DigitalOcean, Heroku and AWS for some years now.
Recently, I decided to give GCE (Google Compute Engine), and, more specifically, GKE (Google Container Engine) a try. In this post I intend to show a few things I learned and/or struggled with.
SSL and...
Go provides several pprof profiles out of thet box to gather profiling data from Go programs.
The builtin profiles provided by the runtime/pprof package:
profile: CPU profile determines where a program spends its time while actively consuming CPU cycles (as opposed while sleeping...