text stringlengths 0 2.35k |
|---|
**Kemal Akkoyun:** I guess it depends on what kind of program or service that you're writing, right? Let's say you have an online system, and it's a request serving system, like HTTP or gRPC. Maybe you are putting this program as a service, and then we can talk about maybe service-level objectives. And what actually af... |
This is one example, but we also have different types of systems... Maybe they're not online request-based systems, but they're batch processors, or offline systems, or some event processing system - then you need to consider other stuff. So everything starts with knowing your basic purpose of your system. |
**Bartlomiej Płotka:** Maybe I will play like a devil's advocate here, Kemal... And I agree with you, but I think that the general misconception these days is that as a developer, you are giving me some solutions for SRE, for DevOps, for operator, that show me some kind of metrics of SLOs, and service availability... B... |
**Kemal Akkoyun:** By tools you mean like observability \[unintelligible 00:13:58.11\] |
**Bartlomiej Płotka:** Like metrics of HTTP requests on my SLO dashboard - how can I use it for efficiency improvements? |
**Kemal Akkoyun:** \[14:11\] This is your North Star metric, right? The most important one. Because think about - you are having a website, and you are actually serving a website, and the most important thing for your user is how fast it actually renders. Because psychology shows us there are some attention spans, and ... |
Or even before that, if you're serving that request with a success, you need to know that. That's why I always advise to start with these type of high-level metrics. But then - let's take latency, right? HTTP request latency; you're serving this website, but then you can drill down, like what does this mean for the sys... |
**Christian Simon:** Yeah, great. Exactly right. I was kind of challenging you... But generally - yeah, I agree; you can use the same metric, kind of pipeline. So the same client instrumentation in Golang, where you are either importing some library with this instrumentation, or you have instrumentation built-in, maybe... |
**Mat Ryer:** So say that you've got this setup, then, and you've got a good idea of some kind of metric on your code. And hopefully, what it's doing in production; because that's the other thing - like, it might work great on your machine, but once it's running at scale, for whatever reason, just the way it interacts ... |
**Kemal Akkoyun:** We haven't jumped into that, but right now, I'm working on a continuous profiling tool. We haven't even basically defined the profiling, but let's say we define - profiling is kind of an observability signal. It's an action that you collect the resource usages of your processes that's running on your... |
\[17:56\] Same goes for metrics. You have a latency metric, and you can define some SLO-based alert on that. And that alerting part actually makes the difference, right? So all of a sudden, you release a version, and your latency has spiked, and it actually triggered an alert. Now that you know -- since you put that al... |
**Bartlomiej Płotka:** I think it's great. I think you're kind of explaining the production assessment level, right? So when you're actually building your PR, merging, everything deploys, you release it to different environments, and finally it gets to production. And that's your assessment. That's probably that ideal ... |
We also have unit tests that always are running on PR. We have integration tests that sometimes are running on PR. It depends how much you want to pay. And there are production tests, or load tests maybe, and end-to-end tests. There are different kinds of levels, and no one is saying you should always only implement un... |
What we have in Prometheus, for example - we have macro benchmarks. So we spin up a test cluster with Prometheus server, which is kind of like written in Golang, some time-series for metrics. And then we can kind of spin up this setup on the PR. So we say, "Hey, prompt test kind of start" and then it starts, it gives y... |
**Christian Simon:** I guess for us, we also have that kind of \[unintelligible 00:21:10.06\] tools before we cut a release. At Grafana Labs we usually cut a weekly release, and then go through different stages, like more of the internal tools, and then into production. And yeah, we would really only alert on SLO. So i... |
**Bartlomiej Płotka:** \[21:55\] Yeah, it's very manual right now, because again, it's kind of a community project, so it's not like tied to any production, one production kind of environment. So it will be hard, but it's kind of manual these days. But it's good enough, right? However, I think that if you look on the V... |
**Break:** \[23:01\] |
**Kemal Akkoyun:** I think I'm going to disagree with Bartek, at least partially, about testing this stuff... So here comes my first unpopular opinion. So even though testing and doing end-to-end tests or synthetic benchmarks on your development machine or on your CI, your development environment is not the same with y... |
On top of that, one other thing is with the prom bench, or with the Prometheus project, we actually know what is the hot path, so that's why we have those benchmarking tools. We know what to optimize, and we know beforehand what shouldn't go out of range, so that we have that in CI. So it's really helpful. |
But most of the other projects, you don't have this information, and you actually don't know what to optimize. So there's a lot of unknown unknowns. For those types of things, actually doing this on production, with certain metrics, or like certain facilities to collect this data is more valuable to me. |
**Mat Ryer:** Yeah. Could you have like a budget, so that you say, "We're going to add features, we're going to add extra work, so we know that's going to slow it down, but we want to set a budget for how much we could do that?", something like that, those kinds of techniques. Does that work? |
**Christian Simon:** I think I'm always a fan of having maybe two feature sprints, and then one tech debt clean-up to maybe bring those new inefficiencies or newly identified - yeah, hot paths, maybe fix them, make them more efficient... I think that seems to work quite well, I guess. And we also notice in the project ... |
**Mat Ryer:** Yeah. It's quite nice, because you can kind of free yourself and focus on the features, and then you know that at some point you'll then go back and have that dedicated time to pay off the tech debt, or just see what the impact is. |
**Christian Simon:** And you don't know how a particular feature is used... So I'm working on continuous profiling as well on Flare, but before, on Loki, we implemented deletions, and we had an idea of what kind of requests to expect, but I guess within the first month we had very interesting requests, in terms of thei... |
**Mat Ryer:** Was it just that people wanted to use a new feature, so they're like "Right, what can we delete? Let's do it." Because I'm like that when I get a new phone; I'm like "Yeah, I'm using all these features, because they're new." You know, it's an expensive phone, so... |
**Christian Simon:** Yeah, let's delete every second line of your logs. |
**Mat Ryer:** \[27:53\] Yeah, why not? You halve your bill... |
**Bartlomiej Płotka:** Yeah, I think it always kind of depends on the case... But a wonder - let's say you have those weeks for the feature development, and then you deploy those features, and the SLO is... Or like some kind of like this measurement assessment is threat. What do you do - wait until the tech debt, or yo... |
**Mat Ryer:** What do you do though, Christian? |
**Christian Simon:** Yeah, I guess we look at error budgets, and I guess as long as we are within the budget, I guess we can kind of push it down the line, I would say... But yeah, I think if we kind of exceeded our error budget, then this definitely becomes not \[unintelligible 00:28:31.03\] but definitely will kind o... |
**Bartlomiej Płotka:** Yeah, makes sense. It makes sense, yeah. Definitely. And it's kind of like a data-driven approach, where you kind of express everything in number... Like, "Hey, how much can I sacrifice?" However, the problem is usually people don't set the goals, don't set the performance requirements, or effici... |
I think that's the trouble that many engineers have; it's very hard to set the goals, because it sets you up for failure, and this kind of like psychology behind that. I think we should do it more. I think we should set more goals, to know our budgets, essentially. |
**Christian Simon:** Yeah. I think it doesn't help that the billing cycle, for example from cloud providers, is not really matching up maybe with your kind of release cycles; they're often delayed, or kind of over longer periods... So we definitely kind of got that with a bit of delay... And then it was even more impor... |
**Bartlomiej Płotka:** Yeah, that's a cool problem to keep in mind. I guess there are tools like OpenCost, or even CNCF tools that kind of calculates, gathers some observability about your projects, and even Go applications, and then they kind of try to calculate the costs. So yeah, maybe that will help, but... Yeah, g... |
**Mat Ryer:** Yeah. So that's really interesting... Kemal, you mentioned earlier really the best way to get this data is to do it in production. Is there a cost to that? Because you're doing extra work to get that observability data out. Does that itself, not slow things down? |
**Kemal Akkoyun:** Of course, there's a cost attached to that. There is no free lunch, right? So that's why when it comes to observability, you actually -- or at least I tend to start with metrics, right? That's the low-cost observability signal that you can collect from your systems, because it's just an aggregation. ... |
This, as far as I've seen, in most of the cases, our metrics are super-useful, and so it does the job. But in most of the cases, there is this in-depth situation; maybe you need more information about your system, maybe that's where the logs comes in, or any eventing system that you collect from your system comes in, a... |
If you have tracing data - this is really nice, because then right now, you can actually propagate your context between other services or other context boundaries, and you can have a broader picture of the system. This is another observability signal. But again, there's another cost attached to that. First of all, it's... |
**Mat Ryer:** \[32:33\] We are the one deleting them then, all that time... |
**Kemal Akkoyun:** I tend to just not store them... Even though I really like writing log lines, because while developing it's a single process, I know what's going on, and it helps me a lot. And then on top of that, you have profiling, and it's really easy to profile your applications using Go. But profiling is specif... |
**Mat Ryer:** Yeah, something that you cover in your book, Bartek... And by the way, congrats on the book. |
**Bartlomiej Płotka:** Thanks. |
**Mat Ryer:** I don't get a kickback from it, so I can just say, it is available now... So if you want to learn about writing efficient Go, get it. In your book, I know that you mention this trade-off between features and performance. And we've kind of talked about this when you sort of build up tech debt as you go alo... |
**Bartlomiej Płotka:** Yeah, totally. It's kind of an everyday question almost, if we should invest in some amazing feature... And especially deletion is an interesting one, because we usually - at least in our ecosystem of like Prometheus, and the Thanos project, as well as Mimir, and Cortex, and Flare even... You kno... |
I really kind of try to recommend into using the same pattern for discussing how much you want to invest in efficiency of something, if we should make it faster or not, or we should maybe disable some feature because it was kind of slowing the system... This is exactly the same discussion as you would have should you a... |
**Christian Simon:** \[36:16\] Yeah. And I guess it's what the business leaders in the end care about; I guess they want to kind of maintain that margin, and the closer to those numbers you can get from your system, from your production system, the easier you will be able to flag issues. If, for example, that deletion ... |
**Mat Ryer:** Yeah, the best performance improvement I remember I ever did, in my whole career - I made something about a thousand times faster by removing a time.sleep that I'd left in there by mistake... \[laughter\] They were thrilled. They were like "This is really fast now." I looked like a hero. Instead, I was of... |
**Bartlomiej Płotka:** Maybe it's a genius move, right? You just put them in, and then remove... Ta-daa! It's an improvement. |
**Mat Ryer:** Yeah. |
**Bartlomiej Płotka:** I mean, this is not a joke. Literally, I was hearing some stories from AWS, or some other service, and... I would need to dig it up, the source of it... But generally, they were having a service, and they added sleep to the service, to not give too fast expectations for people. Because they knew ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.