text
stringlengths
0
2.35k
So literally, those things are recommended, honestly, because if you are kind of like -- again, this is again this budget and goal thing; if you are agreeing with your customer that your service is responding under one second, having it respond in 100 milliseconds, if they pay for one second, sometimes it's not smart, ...
**Mat Ryer:** Yeah, but isn't that the kind of thing that gets leaked at some point, and then there's a big outrage? I don't know if this story is true, but I heard a story of like Uber checking your battery on your phone, and charging you more if your battery was really low. I don't know if that's true or not... But i...
**Bartlomiej Płotka:** I mean, yeah, let's not go there... But the AWS a story - I think it's fair; like, you paid for one second, and that's fair. They want to make this project sustainable. But what you mentioned is kind of like maybe less legal or less clear. But there are things where... How's it called...? Like wh...
**Kemal Akkoyun:** Yeah. But I guess it's legit if it doesn't exceed your error budget, or if it's in your service level agreements, so you can like read the battery levels, or put the sleep in there and slow things down.
**Bartlomiej Płotka:** Yeah, the problem is now you are buying a phone and you have a list of efficiency goals... Like, your keyboard will be always going from bottom in half a second. It's the same with SLOs, like how much granular those kinds of numbers can be. It won't be granular to your local library method in Gol...
**Mat Ryer:** Yeah, another valid use case for sleeping in code I've seen is literally to add a random sleep to sort of jitter requests around as well. And I think that kind of makes sense, because then it's about you're really helping... And as long as, like you say, it's within the budget, maybe it's okay.
**Break:** \[40:49\]
**Mat Ryer:** So how does Go compare to other languages and other technologies when it comes to observability profiling, and being able to actually introspect things that's going on inside the programs? Is it good? Are there good things and bad things? Anything you wish you'd change? Something you love? Christian, what...
**Christian Simon:** So I generally would say it comes with batteries included. So I think compared to other languages, when you install the Go version, that is the most recent one - like, everything is already on your machine. You have basically the runtime, it takes care, for example, of the profiling, and you basica...
I think in all languages you often rely on some external tooling, or kind of intercepting somewhere... And yeah, I guess that makes it kind of available for any program built on top of Go, or built with Go. It just sets a certain standard, I would say.
**Kemal Akkoyun:** I guess I can jump in here... We mentioned the signals, right? For example, one of those signals are metrics, and Bartek and I, we maintain Prometheus client Golang library, which is one of the first Prometheus libraries, right? Surprise, because Prometheus is written in Golang...
**Mat Ryer:** Good choice...
**Kemal Akkoyun:** So from the beginning, the support for metrics for Go was a first-class citizen. On top of that, the Go runtime itself also provides facilities to actually make your programs more introspectable, or observable, right? One of them is profilers. And Go, from the beginning, actually had pprof, which is ...
We also mentioned metrics, and one other thing that we can mention - there is an ongoing PR and a discussion around structure logging, for example. Go has a standard logging library, but now they're trying to improve that, and there are certain controversial opinions around that... But still, I think as a community, Go...
**Mat Ryer:** So sounds pretty good then... Are there any downsides? Anything you wish it did differently?
**Kemal Akkoyun:** \[43:49\] Kind of... I will jump again; I'm super-passionate about like profiling, right? Go itself has a profiler built in, and you can actually expose certain types of profiles out of the box, right? And they're super-useful. But the approach that you have with Go, for example - it's an interrupt-b...
It's actually -- you're changing things a little bit when you want to observe the system itself. So I think this is a downside. And right now, with the improvement of our technology in different parts of the stack, you can actually collect these profiles without paying this cost attached to this.
**Bartlomiej Płotka:** But I guess you could turn off those profiles. There's native profiles if you are a user of eBPF, or some other solution that gives you those information from other sources... I guess -- are you able to turn it off? Isn't that a solution?
**Kemal Akkoyun:** You can definitely turn it off. But I already told you that I'm a big fan of doing things in production, right? I want to profile my applications on production, so I'm always thinking about in that case, right? How can I actually profile this process in production, without paying any cost?
**Bartlomiej Płotka:** Yeah. I guess kind of like your -- you are profiling on production; you need profiling for production use. So that's your production. So that's the cost you're paying. And then you kind of account for that. But yeah, I know what you mean - the more it costs, your observability stack can sometimes...
So yeah, things like metrics and profiles are my favorite ones for like efficiency. You can make them kind of cheap enough for it to be profitable still, but I know your point. And all those kinds of things that are happening in the profilers, either moving into kernel, or kind of like in a Go runtime, making them kind...
**Mat Ryer:** Yeah, maybe we should chat a little bit more about eBPF. This is something that I see a lot, and I see people getting quite excited about it. Liz Rice, I think, has an eBPF book, and it's called... It's "Runtime security", I think, isn't it?
**Bartlomiej Płotka:** Something like that, yeah. And you know, it works on security, and that was the main maybe hype for eEBF... But definitely, it's used much more.
**Kemal Akkoyun:** There is another book, I think, "What is the eBPF", if I'm not mistaken?
**Christian Simon:** Yeah, so that's also the first Google result I've found.
**Mat Ryer:** Well, there's definitely a talk... We'll find out and put this in the show notes. But what is eBPF? What actually is it?
**Kemal Akkoyun:** So I guess I kind of alluded that this is the new solution in the different part of the stack, right? eBPF is actually - yeah, Bartek is actually showing us the book... So you will add the link, I guess...
**Bartlomiej Płotka:** Yeah.
**Kemal Akkoyun:** So eBPF is a new technology in the kernel space. It was actually invented as filtering certain packages, but the acronym became a technology itself. Basically, it's a virtual machine and a verifier that attach to your kernel, and you write your C programs, or you can also write the programs in Rust, ...
\[48:17\] Using perf subsystem you can subscribe to the perf events, and using those perf events you can actually capture the stack traces of your running processes. Then you don't need to actually register something; you just need to subscribe to this perf event, and you can aggregate, and this happens outside the pro...
**Mat Ryer:** Are you excited about eBPF?
**Kemal Akkoyun:** I am totally excited. I'm going crazy about it. I'm also working as a Prometheus maintainer, and mostly working for client Golang; it's an instrumentation library. And recently, I gave a talk in Prometheus Days, and I was focusing on how we can do stuff using eBPF without instrumenting the code, and ...
**Mat Ryer:** You're all-in.
**Kemal Akkoyun:** I'm all-in
**Mat Ryer:** I think it's going to be a popular opinion, but fear not... It wouldn't be Go Time if we didn't explore your unpopular opinions...
**Jingle:** \[49:51\]
**Mat Ryer:** I promised last time that I would kick us off, because I forgot mine... And I've brought two. I've brought a serious one, and a very serious one. And my very serious one is, I think from now on the past tense of screenshot should be screenshat. So we should say like "Oh, did you send that thing to Bobby B...
And my other one was the optional second return arguments that you sometimes have in Go, like when you're checking a map, or doing type positions - I don't think they should be optional. I think you should either have to explicitly use an underscore to say "I'm ignoring this", or you should use it... Because -- I just ...
**Bartlomiej Płotka:** Yeah, I can do that. So my unpopular opinion is that if you see in some software -- if I see in some software three extremely generic abstractions, and they usually are together, things like input, processor and output, source, function, exporters, collector, processors, publishers, in most cases...
I might be kind of exaggerating, but one kind of example is like generic data pipeline, or pub/sub systems that support every data format, and maximum flexibility, and you can configure thousands of intermediate steps as the processor, or between input and output... Or maybe, you know, sometimes I saw this Go interface...
\[52:17\] And the reason why it's bad is because the best abstraction is generally opinionated and small, while the complexity of implementation can be higher, because it's hidden under this abstraction, right? And there is a saying even - keep interfaces shallow, implementation deep. And those things with over-generic...
At the same time, the standard library kind of functions - that's kind of another popular opinion, I guess, but standard libraries sometimes are inefficient, because they're very generic. It has to check different edge cases that you might not have. For example, parsing integer from string, if you don't have negative n...
Anyway, I was just seeing so many failures, so many projects abandoned even, because they were following these very over-generic abstractions... And I want you to be cautious here. That's my opinion.
**Mat Ryer:** Very nice. By the way, some of my best friends are YAML programmers, so let's not... You know...
**Bartlomiej Płotka:** I mean, if you like it sure.
**Mat Ryer:** Is it not just a failing of the naming? It's just that we struggle to name it? Or do you mean about the input and output types as well, like you want those to be very specific, ideally?
**Bartlomiej Płotka:** Yeah, it depends on the case, but generally, you want to have naming, but also underlying kind of configuration options to be opinionated, to be limited; there has to be kind of like defined abstraction. Otherwise, it's over-open, so it leads to abuse of the system as well. So if you want to have...
**Mat Ryer:** Yeah, it makes sense. I understand how it happens, because you want to be so flexible, and really smart, and you want to take on the pain, so that it's easy for people to use... But I kind of agree. Like, if you can be more specific, then do. That's a pretty good one. We'll test it and see, Bartek. And if...
**Bartlomiej Płotka:** Sure.
**Mat Ryer:** Okay. Do we have any other unpopular opinions?