Code Story · Transcripts

S4 E9: Pioneers of Chaos Engineering: How Gremlin Architected Bulletproof Systems with Matt Forniciari

March 2, 2021 · 28:03
Listen to the episode Download .txtDownload .vtt
Matt Forniciari

Early days and still occasionally we talk to people like, why would we ever do this? We have enough chaos as it is. Why would we introduce more chaos? It's introducing controlled chaos to really drive reliability. It was a lot of trial and error, a lot of iteration, a lot of talking to prospects and them being like, cool, but it doesn't have X, Y, and Z and I need those features. So cool, great. I'm going to go home and code those tonight. We did some founder-led sales. Colton and I both used to ride motorcycles, so we'd roll up to our initial customers on, you know, like matching motorcycle jackets and be like, hey, you guys like chaos? Great. We got some chaos for you. My name is Matthew Forniciari, and I'm the CTO and co-founder of Gremlin.

Noah Labhart

This is Code Story, a podcast bringing you interviews with tech visionaries who share in the critical moments of what it takes to change an industry and build and lead a team that has your back. I'm your host, Noah Labhart, and today, how Matt Forniciari built a way for your platform to handle a little chaos. All this and more on Code Story. Matt Forniciari started his career at Amazon. His first gig was on the availability team, but then he was tasked with emailing Jeff Bezos directly about what was working and not working, which he rightfully so says was stressful. He spends a lot of time outdoors and mostly away from tech. He's so immersed in tech during the day he prefers to do analog activities and a lot of activities that require motion. In fact, he claims that his career after tech will be something like a park ranger, taking care of the outdoors. While he was managing platforms for other companies like Salesforce and Amazon, he was burning the midnight oil creating something to help build resiliency in your platform, a solution based on the principles of chaos engineering. This is the creation story of Gremlin.

Matt Forniciari

Gremlin is a chaos engineering platform, chaos engineering in the vein of increasing reliability. Chaos engineering got really popular around the Netflix announcement of Chaos Monkey, where it's randomly going out, shutting down instances. We really think about it in a much more scientific way. You know, you want to set a hypothesis, you want to have acceptance, rejection criteria, and you want to go out and validate whether your system behaves the way you expect it to. So chaos engineering is really, I mean, it's one tool in the toolbox for reliability. We actually just hit our five-year anniversary. Pretty incredible for us. The way we started this way back when it was, you know, it was me working out of my San Francisco apartment, my co-founder Colton working out of his house in San Jose. I mean, burning the midnight oil while we were working at other places thinking about, cool, can we actually do this? And we actually ended up building the product very iteratively. You know, it's an agent-based way to inject failure into your systems. obviously, you know, agent-based way, we started with building an agent. That really started with let's pick a language, what will have low overhead, et cetera, et cetera. We ended up deciding to go with Rust. We ended up building out a very lightweight Rust binary. And five years ago, there wasn't really even a Rust 1.0. In fact, it's funny. The Mozilla folks that were working on Rust, the language, are around the corner from us on the Embarcadero. And I remember taking my laptop to them one day and being like, is this how you're supposed to write Rust? just such a new language. We were kind of cutting edge in that regard. So ended up building out, you know, an agent first. It didn't have any communication with the control plane or anything like that. And it was very, very like CLI oriented. So you could always drop into a shell still to this day and go execute commands by hand on your box, you know, wherever the Gremlin agent is installed. The next step was, you know, building out the control plane, building out an API that that really orchestrated all of these agents across your infrastructure everywhere. So that took a whole different set of skills. We turned to Java for that since, you know, my co-founder and I were both pretty proficient in Java. We built out a very thin API layer that really was like the command and control for all of these different agents. We built in, you know, safety, security from the ground up. In fact, I wrote all of our original security, which has, thank God, since been overhauled, but built in, you know, safety mechanisms around dead man switches. to the control plane, make sure that you fail open, you failing open, meaning killing off all attacks that are in progress. And really that introduced the idea of simpler chaos, right? You don't have to have eyes on glass. You don't have to be actually on box running these commands. You can go to an API and issue a command for whatever target matches some targeting criteria. And then we both had really dramatic experiences at Amazon writing tools that didn't get adopted because they weren't simple enough to use. engineers' dilemmas is trying to architect for all the corner cases up front and just make things too complicated. So simplicity is the last of our core product principles. And that really translates into our UI, our GUI that people come in and interact with in order to issue commands to the API. But we're API driven, right? So we ended up writing the first passes of our website. I'm glad those no longer exist. We ended up writing them in Ember and they were something, they were a sight to be seen. In fact, the Wayback Machine, we took a look at them the other day for five years and it was like, whoa, these are, I'm glad we have designers and front end engineers and all that now. But that's the three core concepts behind, behind Gremlin. It's pretty straightforward, but it, that's, that's how it progressed, you know, from the most atomic building block up.

Noah Labhart

Let's dive into the MVP. So that first prototype you built, how long did it take to build? And I think you mentioned Rust, but what, what other sort of tools did you use to bring it to life.

Matt Forniciari

Those technologies that I mentioned are pretty much what we got. You know, we use DynamoDB behind the scenes. We stored a couple of things to S3, but it was primarily Rust. And I'll say for those of you out there that are thinking about dabbling in Rust, there is a steep learning curve. There's this thing called the borrow checker and it is a pain, but it actually eliminates this whole class of errors. The way I've described Rust to people is it's C if you took all the things you hate about C and got rid of them. So like no dangling pointers, no use after free errors. This borrow checker helps you think about lifetimes of variables in a very concrete way up front. Keeps you from shooting yourself in the foot. So the main stumbling blocks to getting going, we're really learning Rust. And then we actually used from our stumbling blocks to getting going, were really learning Rust. And then we actually used from our being able to add latency to the packets as they flow out of your box. We used a Linux utility called TC, short for traffic control, which is maybe one of the most poorly documented Linux utilities to ever exist. So it was a lot of trial and error. Those are really the main stumbling blocks. The resource attacks, being able to modify time, like these things are all pretty well understood. Consuming CPU, consuming memory, just allocate a big object and just hold onto it for a little while. TC was the hardest thing to wrap our head around, but the networking and seeing a faulty network, especially in the day of microservices and the cloud is one of the most important things we offer to folks being able to manipulate that in a very safe and secure manner.

Noah Labhart

So you've described the building blocks of the MVP, you know, kind of what you use to get it off the ground. And you sort of touched on this in the overview, but what sort of decisions and trade-offs did you have to make when you were building that MVP and, you know, feature cut or or technical debt, or anything like that to get the product out the door? And how did you cope with those decisions?

Matt Forniciari

I like to think I didn't leave a lot of technical debt behind, but a lot of the code base still originates from a lot of my code. And I'm sure my engineers these days have plenty that they would tell you if you got them on the podcast. So at the time, there wasn't a ton of focus in the market. In fact, we were a little bit more bleeding edge than I think we needed to be. We probably could have waited a year to get into it. much in the way of trade-offs around actual features. We were blazing this trail. And so a lot of it was, look, what do we need? What would we want as engineers? To your point around, how do you cope with that? When we originally started the company, Colton, my co-founder, and I decided, OK, one of us is going to be CEO. The other is going to be CTO. And I was like, look, man, I'll write beautiful code. That's what I'll do. Naturally, we found a little bit of a split there. But I think what I really needed to learn initially, and I was 26 when we started this company, learn that things aren't going to always be perfect. We couldn't stop moving forward to make sure everything was all buttoned up perfectly. We had to make some of those concessions around debt so that we could start to put something out there. We did some founder-led sales. Colton and I both used to ride motorcycles. So we'd roll up to our initial customers on matching motorcycle jackets and be like, hey, you guys like chaos? Great. We got some chaos for you.

Noah Labhart

That's awesome.

Matt Forniciari

We had to get a product. We had to start selling. The whole deal with startups is, I'm sure you know this, that you're on borrowed time always. And so figuring out what is the MVP? What is a minimum viable product that you can get out the door that has the most value? That's a hard row to hoe, especially if you're used to working in big companies. So it was a lot of trial and error, a lot of iteration, a lot of talking to prospects and them being like, cool, but it doesn't have X, Y, and Z, and I need those features. So So cool, great. night. You know, they're not going to be perfect, but we're going to get them back to you. We'll chat next week. It was learning to just iterate much more quickly and not get so hung up on, well, this isn't the perfect, the whatever it is, you know, perfect is the enemy of progress or whatever that saying is.

Noah Labhart

Well, then so decisions and trade-offs and learning to let go of perfection, but then you get some product market fit and you get some traction. How did you progress the product from there? And I think I'm most interested in how you built your roadmap of figuring out what was the next most important thing to build.

Matt Forniciari

I'll be honest, we've had a lot of back and forth on some of these things. Colton and I have always had a pretty good vision of what we wanted to build from the ground up from day one. Since nobody's been in the San Francisco office, my head of product and I whiteboarded a roadmap about eight months ago, and it is way off, but I'm looking at it because it's still emblazoned on the whiteboard. We've had to do a lot of talking to customers about what they're looking for, what they want, and a little bit of innovation there. There's this concept of the feedback loop. You know, did my experiment actually do what I wanted to do? And how can I automate knowing that? And so we had to kind of step in it a couple times to figure out exactly what we were looking for. And I think we're to a great place now. But how did we set our roadmap? We put things on there and we've had some misses. You know, we created this application level failure injection platform. much more tightly integrated with your code base. It actually uses like client libraries and it just, it didn't take off quite the way we expected it to. So we've built some things that, you know, maybe we're too far ahead of our time. We've built some things that weren't full featured and we've had to go back and tweak and twist them a little bit, you know, chop and screw them a little bit. But it's been a process and we've just, the way I think about it is we've just gotten better at extending our time horizon, our decision horizon by validating these things with customers more early and more often.

Noah Labhart

visual of extending or in my head, the visual of extending the time horizon. So I feel like that's very appropriate for a startup as well as like you plan just as far as you can see. And then you work that plan. Is that kind of what you guys did? Yeah,

Matt Forniciari

absolutely. And I mean, I'll be honest, a couple of years ago, it was like, cool, we know what we're doing for the next three sprints. Great. That's awesome. We have a rough idea beyond that. And now I think, you know, we just went through fiscal year 2022 planning and we've got a pretty good grasp on what the year holds and we're a little bit more confident that hey these are the things that our customers need in order to be successful it always boils back down to customer if if we haven't vetted these by customers they're not ready to go we're not confident and that's what we're going to build they need to be vetted by the customer our number one core value is is uh customer focus and you know that's that's probably something that holds over from the amazon days from the customer obsession, but it's what's driven us and gotten us to where we are. So we've got to make sure that they're successful first and foremost.

Noah Labhart

Well, let's switch to team. So how did you build your team and what did you look for in those people to indicate that they were the winning horses to join you?

Matt Forniciari

I mean, I can speak, you know, about the early 10 and really what, what we were looking for then the 10, the 15, the first folks to really join, it was, it was a hunger. And like, it was It was a lot of people that already had experience with chaos engineering, with reliability, that had been SREs and knew the value of this practice. People that were willing to forego positions at much larger companies, possibly with bigger salaries, to take a bet and be like, hey, I think this is really going to be something. And I'm willing to work incredibly hard to change the paradigm of how folks engineer code, how they think about reliability. You know, it's interesting. We started the company five years ago, you know, 2016-ish, like early 2016. It was still the time where we were still on the cusp a little bit of downtime being acceptable. Like there were still some websites like scheduled maintenance windows. And we just knew that over time that was going to continue to accelerate. You know, that was that trend of being able to say, hey, there's downtime. It's going to go away. And the folks that we brought in early were the folks that were like, yeah, that's not a thing anymore. Focus on reliability. If you don't have SREs, you need to train your application engineers on what building reliable systems are. You know, the DevOps movement, you need to make sure that you understand this. And it was people primarily that had been operators. People that had similar experiences to me where, I mean, I got to Amazon and they tossed me a page and were just like, good luck. And I was like, okay, cool. It was a lot of those folks initially. As we went along from an engineering perspective, it was just people that are hungry. You know, people that are always willing to learn. That's one of those things that I don't think we're ever going to get rid of. You know, I think one of the hallmarks of a great engineer, honestly, a great startup employee, period, is just throw it at me. Toss me in. I'm going to learn to swim. Whatever it is, I want to be learning every single day. I want to be getting that much better. That's really what we look for. Aside from that, you know, the folks that adhere to our core values, especially, you know, being customer focused, having a bias for action. And then the third one being context not control. Those are our top three. We've got a couple others, but those are the ones that we really vet very highly in our interview process. Can you go and be autonomous and learn and make sure that you tie everything back to value and all of that?

Noah Labhart

Well, let's talk about scalability. So did you build this to scale efficiently from day one, or were you fighting this as you grew?

Matt Forniciari

Honestly, I think the engineering portion, given what we had seen before, the actual infrastructure, how we built out the code base, our site's pretty reliable, pretty secure for the stage we're at and always has been. The people side of things is, I think, the area that we've had a little bit more challenge, especially we started the company remote by default. We've eventually opened offices in San Jose and San Francisco. But how do you actually scale an organization where you don't have people coming into the office, where you're not doing that sort of training? It's a little bit more of a difficult challenge. And I think we're all much more familiar with it now after the past year and being locked away at home. Initially, in the first five years, it was very difficult. One of our original engineers was in Germany and just trying to figure out how to communicate with him and have time overlap was difficult. And, you know, trying to figure out how to establish a culture and to really drive that when you don't have that shared common place and that sort of thing is it's a challenge unto itself, you know.

Noah Labhart

As you step out on the balcony and you look across all you've built, what are you most proud of?

Matt Forniciari

What I've come to is really just the resilience of this company. It may seem a little tongue-in-cheek given we're a reliability company and resilience is part of our big play here, but it's been a rough year. It had been a rough year going through the pandemic, I think, and social unrest and the elections. I think it weighed on a lot of people, but it was also a tough year for us as a company. We decided to go through a RIF to bring our spending back in line with our revenue and be a much more fiscally responsible company. And it was hard. It was hard on a lot of people. And we've just come out the other side so much stronger. We've got a very clear product vision. We've got people that are excited. We're hiring pretty rapidly again. And it's just it's incredible to see people go through a dark time like that and come out the other side much happier, much more confident, much more settled. I've been incredibly proud, at least in the recent past. It may just be recency bias, but I'm incredibly proud of the way the team handled a difficult time and a difficult year and came out the other side stronger.

Noah Labhart

Well, let's flip the script a little bit. Tell me about a mistake you made and how you and your team responded to it.

Matt Forniciari

We've incurred a lot of technical debt. debt, we've gone down the rabbit hole of not necessarily becoming a feature factory per se, but not making the time necessary, not setting aside the time to be able to alleviate some of those burdens that come with technical debt. And I was actually just talking to one of my engineers on one-on-one the other day, and he's like, when are we going to finish these things? We've started X, Y, and Z technical debt problems. And having something go halfway done is almost worse than having it not even started. So, you know, we got into it pretty deep and we're going to schedule a meeting to discuss, okay, once we get through, you know, this delivery date that we've already committed to within the rest of the organization, how are we going to be able to slot in a little bit of time for technical debt? Are we going to take on a two-week sprint where we just do this? Are we going to have, you know, as we build out another engineering team, is their onboarding task going to be to go through and start cleaning up some of these things? Like, how are we going to tackle this? Because if we don't start tackling this, we're going to start drowning in it. It's a little bit of a roundabout way of answering your question. We haven't solved the problem just yet, but I definitely think it's a mistake from an engineering perspective to just consistently pick up technical debt without a plan to pay it down. We've had, like I said, we've had a bit of a rough year. And so figuring out now that we've stabilized, how do we find out or how do we plan to pay down some of that technical debt? I mean, the word debt is in that. If you don't pay down your debt, it comes, you know, comes knocking at some point. So we're working some of it into our sprints. But how do we plan for it? How do we communicate timelines based on the fact that we're taking on some of that debt? It's something that we're still trying to get better at.

Noah Labhart

Well, what does the future look like for your product and for your team?

Matt Forniciari

What the future looks like for our product and our team. Right now, we're a single track team and we're rebuilding that out, building out a more robust platform team, really focusing on moving towards CI/CD, quicker delivery. You know, our platform is pretty robust. And so figuring out what a robust acceptance criteria is, or at least a minimal acceptance criteria is, that we can make those moves and feel confident. You know, we've got some smoke testing, but how do you actually connect all the pieces together and do that? I actually just hired a new infrastructure engineer who's going to come in and help with some of that. Beyond that, you know, what is the future of the product? The future of the product is reliability. It's not chaos engineering. I mean, chaos engineering is the validation mechanism to all of this reliability. But ultimately, the end goal, the reason people hire Gremlin is not to just go create chaos. I mean, in early days and still occasionally we talk to people like, why would we ever do this? We have enough chaos as it is. Why would we introduce more chaos? And it was definitely way more early days. But it's introducing controlled chaos to really drive reliability. And so how do we transform the product in such a way that we are giving you the tools and not just chaos engineering? Like I said, chaos engineering is one of those tools. with the end goal in mind to improve your reliability and then let you track that and figure out, am I improving? What am I doing to improve? How is it improving me? And it's being able to answer those questions because one of the hardest questions to answer with, there's an analogy in the security space, but with reliability as well, is how do you measure the value of something that doesn't happen, right? How do you measure the value of an outage that doesn't occur? How do you measure the value of the non-incident, the non-engineering hours that are taken up by You know, ultimately what we want to get our customers to is just boring. Like boring is great from a business perspective. You just want to keep chugging along. That's the transformation the product is going to be going through in the next year, the next year and a half. Not just chaos, chaos with a means, chaos with an end.

Noah Labhart

So, Matt, who influences the way that you work? You know, CEO, CTO, architect, really any person. Name a person you look up to and why.

Matt Forniciari

lie. One of the people that I've really spent a lot of time reading up on, reading his books, that sort of thing, is Cal Newport. Deep Work, Digital Minimalism, these books that he's written, and he actually does a podcast now. I really appreciate how he thinks about things. Digital Minimalism was one of those things I read during a particularly overloaded period in my life and started to adopt some of those practices where it's like, cool, I've removed Slack from my phone. I just can't, I can't do it. I started doing work blocking and basically being like, look, if I don't have my three hours from nine to, you know, I rarely do, but try to set aside my three hours from like nine to 10 or nine to 12 or some modicum of that to actually do the deep work I have to do and not just be in meetings all day, you know, be able to set product strategy, be able to go read through our board updates and make sure the narrative makes sense. And where you can't be switching back and forth. I've really loved everything that he's put out there. And I just, I like the pragmatic way he approaches work in general. All life is work really to some degree. And so figuring out and categorizing, you know, how do you spend your time and taking a look at that, thinking about where do I want to spend my time? And it's really about spending that time. You know, time is the only non-renewable resource and you spend it, you know, one minute at a time. So how can you be most effective with that? I'm a bit of an optimization nerd. that doesn't surprise anybody, but that's one of the people that's really had an outsized impact on me and how I think about work over the past couple of years.

Noah Labhart

You know, we talked about a mistake and you worked through that, but if you could go back to the beginning, a little bit different spin, if you could go back to the beginning, what would you do differently or where would you consider taking a different approach?

Matt Forniciari

I think the thing I would do differently is establish really, I mean, culture is a huge aspect of what I love about this. You know, being able to create a company from the ground up and instill some of your values into it. Not necessarily protect them per se, but try to shepherd them along. I think I'd go back to the beginning and very clearly define what those are from the get go and how we're going to interview for those things. how they're going to be part of everyone we bring on. And then make sure that we're not just bringing in people to fill seats. You know, I don't, not to say that we did, but making sure that each of them really aligns with that. You know, and really only hiring when we absolutely need a role. This is all kind of to say, I think we grew a little faster than we needed to in the initial years. We got up to like 80 people around year like three and a half. And I think we hired like 20 people in like two quarters, like our third year or something like that. And it was just, it's a lot. And things change so drastically. And if you don't take the time to really enumerate what those values are and espouse them with people, it can kind of get away from you a little bit. So it's a little bit of a fuzzy answer, I think. But, you know, your culture at one of these companies, I'm sure you know, you know, your culture at a startup is it's very malleable in the early days and just making sure that those folks you're bringing in, one, you know, you need somebody to sit in that seat, but two, that they really align with those things. And obviously everybody brings a little bit of something different. So it's always great to have some of those little variations, but as long as they're not drastic variations from things that you believe in as a company and as an organization.

Noah Labhart

So you're getting on a plane and you're sitting next to a young entrepreneur who's built the next big thing. They're jazzed about it. They can't wait to show it off to the world. They can't wait to show it off to you right there on the plane. what advice do you give that person having gone down this road a bit

Matt Forniciari

it's really dependent on you know where they are in their company life cycle whether they've found product market fit or still looking for it i'm assuming they they've got some good fit here depends on their role but i think more than anything if they're they're a higher up in the company i'd recommend to them or i'd give the advice i would give to them is just be prepared and be willing to wear many many hats. My journey has taken me from just coder up through VP of product and whatever we want to call it, engineering lead or whatever. But you'll wear a whole bunch of hats throughout your progression. The thing that I'm now going back and taking a look at is which of those things did I really, really enjoy? And which of those do I think I am uniquely positioned to do? Because ultimately, Ultimately, you can hire away some of these things. You can find good people to fill out some of these roles. But it's really important if you're one of the founders, one of the early people in the company to understand where your strengths are and areas that you really enjoy. Because if you're not doing something you enjoy every day or something that you're not great at, you can learn. It's going to be a lot harder of a journey. So you're going to have to wear all these hats, but take the good from all of these things. is understand where you excel, what you exceed in, or what you enjoy. And really, eventually, you're going to have to craft your own narrative there around what the role and responsibility is. And so making sure you understand what that is is very, very important, not only for your success and longevity, but for the success of the company.

Noah Labhart

That's great advice. Well, Matt, thank you for being on the show today. Thank you for telling the creation story of Gremlin.

Matt Forniciari

Yeah, I really appreciate you having me, Noah. It's been great to chat with you.

Noah Labhart

And this concludes another chapter of Code Story. Code Story is hosted and produced by Noah Labhart. Be sure to subscribe on Apple Podcasts, Spotify, or the podcasting app of your choice. Support the show on patreon.com slash Code Story for just five to ten bucks a month. And when you get a chance, leave us a review. Both things help us out tremendously. And thanks again for listening.

Transcribed with Whisper and reviewed for names and terms; speaker labels are automatic and may contain small errors. Timestamps link to that moment of the transcript.