text stringlengths 0 1.49k |
|---|
**Andrew Poydence:** Yeah, so we (as in Pivotal) originally inherited Cloud Foundry from VMware, and VMware had done everything in Ruby. And the DEA, which was the Droplet Execution Agent, was written in Ruby, and it was essentially a giant black box of magic, where everything was written with metaprogramming, and stan... |
\[04:07\] So we wanted to add quite a bit of functionality, including speed, and being able to implement that in Ruby became insurmountable; there were all the security concerns, there were orchestration problems, so some developers decided "Hey, this would be a great opportunity to re-write this in a way that would ac... |
Go was picked because of its simplicity, so DEA Go (which is Diego) was born, and it's a massively distributed team; it's got contributors all across the country... I think there's people in Europe contributing to it, and it lends itself to that because it was written in Go and people can quickly jump in, gather contex... |
**Brian Ketelsen:** Nice! |
**Carlisia Thompson:** I would love to talk more about that, actually. What makes you say that -- well, that's my take on it anyway... My take on what you've just said is that because the system is written in Go, it lends itself well for a distributed team to work on - what makes you say that? |
**Jason Keene:** Some of the insights I have is that it seems like engineers, no matter what their background is, whether it's a dynamic language or a statically-typed language like C\# or Java, they really feel comfortable in Go. Go is kind of like the subset of -- it's such a small language that it's a subset of like... |
We have people on our teams that have backgrounds in Java, people on our teams that have backgrounds in Ruby, or Python, and they're able to pick up Go really fast. |
**Andrew Poydence:** The counterpoint or counterexample would be I worked on a Java project for Cloud Foundry, and we had several frameworks... And when you joined the team, you had to get up to speed first with all the frameworks, and then which components use what frameworks where. So before you could even be success... |
With Go, since a lot of these things aren't written in frameworks, you can simply drop in, look at the tests that were written - everything is well tested - and get enough context with what you need, add your addition, make the PR, see that the tests pass, and feel confident that what you actually added will get merged... |
**Carlisia Thompson:** That is something we take for granted, isn't it? We don't usually use a framework and we don't have that extra thing to learn... Even though, for example, people who come from the Ruby on Rails background -- when people learned Ruby, they learned Ruby via learning Rails. The exposure to Rails was... |
**Andrew Poydence:** It lends itself to, I think, enabling people to quickly help without all this extra \[unintelligible 00:07:56.16\] and we're not switching between frameworks all the time, much like maybe on a JavaScript project. |
**Jason Keene:** \[08:02\] Also, the standard library is very high quality and it's almost intuitive. Once you learn one standard library package, the conventions, the intuition you develop from learning that package translates into most of the other packages in the standard library, so that also helps with getting peo... |
**Carlisia Thompson:** So let's continue on this thread - I'm curious to know, for Loggregator do you make use of an external package, or are you doing everything just mostly using the standard library? Do you use an external package that has to do with logging? |
**Andrew Poydence:** We use [gRPC](https://grpc.io/) very heavily for our transport, but we've kind of homegrown the metrics and logging concept. We have something called envelopes, which are actually protocol platform messages, that encompass a log message as like textual information, or a counter-event, or a gauge me... |
But we're not actually using anything off the shelf, per se. In fact, Loggregator was incepted I believe in 2013, so it's pretty old, and a lot of our stuff around that has to kind of deal with the fact that we have this very old Go project where -- Go wasn't as heavily adopted back then, and there were a lot less tool... |
**Brian Ketelsen:** gRPC is a great reason to do that. |
**Andrew Poydence:** Exactly. |
**Carlisia Thompson:** I was gonna ask, do you find yourself having to rewrite stuff that you wrote way back in Go? |
**Jason Keene:** Yeah, I would say a large portion of the Loggregator Go source code has been at least heavily modified, if not rewritten at this point. It's an incremental approach that we've had over the past two years. As a need is put on us from a product perspective or an engineering perspective, we then decompose... |
We've done that with several of the components, so yeah, I'd say we've done a good amount of rewriting, but it's rewriting that's informed by a lot of different variables, it's not just engineers wanting to rewrite something. |
**Carlisia Thompson:** And these variables, can you give us an idea...? Because it's very interesting to talk to somebody who has been working with one particular project for so many years, and we're always trying to take insights for people who are listening that they can pay attention to and maybe use in their own wo... |
**Jason Keene:** \[11:47\] Yeah, I guess I could give one of the examples of something we've rewritten -- we switched over to using gRPC well over a year and a half ago, and that was kind of motivated from an engineering perspective... Like, we wanted to reduce the cost of us maintaining our own custom messaging. Previ... |
gRPC gives us mutual auth TLS, which is an awesome feature to have for doing secure communication between different components, and we get that as a feature, and as part of that, we get to also reduce some of the technical debt on the project and do a rewrite of our message transport. |
**Carlisia Thompson:** Very cool. |
**Andrew Poydence:** One of the other big drivers has been the growth of Cloud Foundry. Before, Cloud Foundry probably was only handling a few dozen apps at a time, and now you have larger installations of Cloud Foundry that have upwards of like 250,000 app instances running, which means all those apps are trying to st... |
So as these larger deployments have come out, we wanted to be able to handle all that log load, so we've had to invent a few things around that and better understand what that meant to handle that many messages a second, and large dynamic payloads, and just many, many consumers that are trying to get all those payloads... |
**Erik St. Martin:** That's actually a really interesting thing... So what are some areas that you ran into, like you kind of alluded to, where you had to invent some things to solve for problems that you didn't experience without having that additional scale? I'd be really interested to hear about some of those things... |
**Jason Keene:** So the big one we ran into first was Loggregator has an agreement with app developers that when you log a `STDOUT', it won't be slow; in fact, it won't push back at all, it should be free. So Loggregator has the task of ensuring that while we do our best to push messages through this distributed networ... |
\[15:59\] So we went and ripped out a lot of channels that we previously had before, to enable less buffering, fewer goroutines per connection, and a little less latent in the end. |
**Carlisia Thompson:** This is open source, isn't it? |
**Jason Keene:** Of course. |
**Andrew Poydence:** Cloud Foundry is open source. If you go under [github.com/cloudfoundry](https://github.com/cloudfoundry), all the components of Cloud Foundry are over there and you'll find these libraries that we're talking about under that URL as well. |
One of the things that came to mind when you were mentioning what type of technical limitations we ran into that we had to kind of step back and think of ways of getting around was we used to use [websockets](https://en.wikipedia.org/wiki/WebSocket) pretty heavily between certain components, and while you can multiplex... |
That was another huge win that we had with gRPC. Since it uses HTTP/2, you get pretty much for free multiplexing on multiple streams across a single TCP connection. So we did a little bit of work around that. We got the multiplexing for free, but then we also noticed that sending all of our streams over a single connec... |
**Carlisia Thompson:** Very cool. |
**Erik St. Martin:** So now are you using your new diode concept throughout other portions, or is this mainly kind of limited to just Loggregator? |
**Andrew Poydence:** Recently we've had some downstream consumers of Loggregator start to use it, so... Google maintains a [Stackdriver Nozzle](https://www.cloudfoundry.org/the-foundry/gcp-stackdriver-nozzle/), which is a component that reads off of our Firehose, which is like all the data coming out of Loggregator, an... |
So they were seeing a lot of these reconnect events and they were panicking on these reconnects, which is a little bit inefficient... So we kind of had a conversation with them and introduced them to the diodes, and they've been able to use that to prevent themselves from getting disconnected by the Loggregator system. |
I'm trying to think of some other projects I've noticed recently who adopted it... |
**Jason Keene:** There's a few closed source ones in Pivotal that use it pretty heavily... |
**Andrew Poydence:** Yeah. I think there was another open source project recently, but it doesn't come to mind. Yeah, it's mainly kind of the Cloud Foundry ecosystem, Pivotal stuff so far. |
**Jason Keene:** It's written in a way though that it certainly could be used anywhere. |
**Andrew Poydence:** Yeah, we try to -- the Cloud Foundry projects... Or at least, I'll speak for Loggregator - Loggregator hasn't had a really good history of extracting useful things for broad consumption, so the diodes is like kind of one of the first projects that we started where we extracted this idea out, so tha... |
**Carlisia Thompson:** Now, I'm reading here that one of your project goals is to have _an opinionated log structure_... So talk to us about that. At the very least -- I've never used it, so I'm guessing it's to offer struct to a logging, and why is that the best goal for this project? |
**Jason Keene:** \[20:06\] We took the approach that there's textual logs, like an application can emit just normal, standard output stuff, and then there's metrics, such as counters, or gauges, timers... Much like you'd find in a project like [Prometheus](https://prometheus.io/). So what we did was we decided "We'll m... |
That has enabled a lot of nice things, because all of a sudden these very generic consumers can come in - such as the Stackdriver one - and not know very much about Cloud Foundry as a whole (this massive system), and yet still can pull in and do very interesting things with the data. So it's been a nice way to document... |
**Carlisia Thompson:** How many fields are there? |
**Jason Keene:** It's pretty limited. |
**Andrew Poydence:** Yeah, so there's a repo called [loggregator-api](https://github.com/cloudfoundry/loggregator-api), which is just our .proto files that we use to generate our clients and everything off of. If you wanna take a look at it... It's pretty conservative. We have a v2 API that started on about a year ago,... |
**Jason Keene:** Our hope is that we have perhaps distanced ourselves away from being specific to Cloud Foundry. There's a lot of neat things happening everywhere - for example [Kubernetes](https://kubernetes.io/) - and what we don't want is to have the Loggregator system be so opinionated that it would only be useful ... |
Loggregator is doing its best to be a distributed logging and metrics system for several distributed systems, and not just Cloud Foundry. We had our original iteration where everything was specific to Cloud Foundry; every metric type was something that only Cloud Foundry could ever care about, and the consumers that wo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.