S13 Bonus: Dynamic Observability: Eliminating Telemetry Waste at Scale with Peter Morelli, Co-Founder & CEO of Bitdrift [0:00:00] Peter Morelli: Most observability tools are built with the same pattern in that you have an agent or an SDK or a sidecar that collects data and then it pushes it into a big database somewhere, whether it's a time series database or store, whatever it is. That works really well in data centers where you have a lot of bandwidth, that your network is reliable, you have a lot of CPU and storage running all the time. None of that's actually true for mobile. And so what we found was if you had a good network connection for a little bit and you caught some telemetry and tried to push it up to a big database in the cloud, it worked. isn't the normal case. A lot of the time your network isn't good or you walk from inside to outside or into a tunnel and then suddenly your network connection drops. We were seeing that the data was being dropped on the ground. My name is Pete Morelli, co-founder and CEO of BitDrift. [0:00:46] Noah Labhart: This is Code Story, a podcast bringing you interviews with tech visionaries. [0:00:52] Clip: Six months moonlighting. There's nothing on the back end. [0:00:55] Noah Labhart: Who share what it takes to change an industry. I don't exactly [0:00:59] Clip: know what to do. Many goes to get right. [0:01:01] Noah Labhart: Who built the teams that have their back. [0:01:04] Clip: A company is its people. The teams help each other achieve more. Most proud of our team. [0:01:08] Noah Labhart: Keeping scalability top of mind. [0:01:11] Clip: All that infrastructure was a pain. Yes, we've been fighting it as we've grown. Total waste of time. [0:01:15] Noah Labhart: The stories you don't read in the headlines. [0:01:18] Clip: It's not an easy thing to achieve, my dear. Took it off the shelf and dusted it off and tried it again. [0:01:22] Noah Labhart: To ride the ups and downs of the startup life. [0:01:26] Clip: You need to really want it. It's not just about technology. All this and more. [0:01:30] Noah Labhart: on Code Story. I'm your host, Noah Labhart, and today, how Peter Morelli is making your mobile observability not suck, so you can define what matters most to capture. Peter Morelli was born and raised in San Francisco, one of the few natives of the area. He was front and center watching the tech scene explode in front of him, and also blow up in front of him. He's lived all over, like New York, San Diego, Texas, London, but always ends up returning to the Bay Area. Outside of tech, he's married with three kids, one in college and the other two in high school. He's a foodie and loves cooking, enjoying the communal, connective aspect of having a meal with his family and friends. Peter spent many years at Lyft, where he and his team became frustrated by traditional observability tools storing unused data. They started to build a solution based on dynamic real-time control paired with local on-device telemetry storage. Once they figured this out and realized their breakthrough, they spun off the solution into its own company. This is the creation story of BitDrift. [0:02:52] Peter Morelli: BitDrift is a company that focuses on mobile and edge observability. not the normal observability in data centers, but stuff on your phone, stuff on devices like kiosks that you see out in the world. And there's a fundamental difference in how that works if you can go into that, but that was what it was founded to serve. Its origin story is a little unique. The co-founders and a lot of the initial group of engineers still at BitDrift all are out of Lyft, the sort of the ride-sharing company. I was the VP of engineering there for eight years. My My co-founders were there at the same time or longer. And we all ran into a lot of the problems that trying to make a good consumer service, trying to understand what your customers are experiencing is really difficult on phones. And so a lot of the things that we faced, that's what we started building the first parts of BitDrift. And about three years ago, we spun out after building it for, I think, six or seven years there. And so it's a pretty mature and scalable product, but that's more of the origin story. It really was to solve an actual problem that we had in spades at Lyft and we couldn't really find in the market and still can't. So that's sort of BitDrift's origin story. [0:04:02] Noah Labhart: Let's dive into the MVP then. So maybe it's the version inside of Lyft or maybe it's when you spun out. You tell me, tell me about the MVP and that first version you built and how long it took to build and what sort of tools you're using to bring it to life. [0:04:18] Peter Morelli: The first version really was driven by the fact that most observability tools are built with the same pattern. And that you have an agent or an SDK or a sidecar that collects data and then it pushes it into a big database somewhere. Whether it's a time series database or store, whatever it is. And that works really well in data centers where you have a lot of bandwidth, that your network is reliable. You have a lot of CPU and storage running all the time. None of that's actually true for mobile. What we found was if you had a good network connection for a little bit and you caught some telemetry and tried to push it up to a big database in the cloud, it worked. But that really isn't the normal case. A lot of time your network isn't good or you walk from inside to outside or into a tunnel and then suddenly your network connection drops. We were seeing that the data was being dropped on the ground. That's still the case. We'll try it for a few times and then drop it on the floor. So when you have those really frustrating experiences where you don't have enough bars, and if you do have bars, it's not working, and you can't get to your car, or couldn't see that it was there, or it wasn't updating, that was when we lost the visibility. And so when your customers are having a bad experience, they'll go to your biggest competitor and maybe never come back. So it was existential to us to have that visibility. So the first version really was collecting all that data onto the phone itself and just making sure that we could upload it later when we did have a good network connection. It's actually really hard to do. You don't want to blow out the storage on the device. So you have to make sure you're not collecting too much data. You don't want to affect the user experience. You have about 16 milliseconds before you start to, a human can notice a lag or freeze. And so how do you do and collect a lot of data without affecting the rest of your app's performance? So a lot of the initial work we did was around performance and memory safety, making sure everything was asynchronous and didn't affect the UX, getting network reliability, detecting when it was going, working well or not. So we ended up with a solution that really wrapped a sort of native libraries. We wrote it in Rust and it still is to this day. It gave us a lot of speed, performance and memory safety. And so we wrapped that in sort of the native layers, Swift and Kotlin. So a lot of that work was done there. And so that really was the use cases that we were trying to do were the Lyft consumer cases. In fact, we actually were at the time exploring writing our own native networking stack based on Envoy. One of my co-founders had done the server version of that Envoy proxy. Matt Klein did that. And we were looking at Envoy mobile. And so debugging a networking stack and all of the varied conditions that a network sees out in the wild, that was the initial use case that we started this on and expanded it since then. The other part that we faced is where the Lyft was still scaling quite a lot. And so we had tens of millions of clients on a daily basis, like connecting and uploading data. And so at that scale, most of their solutions were too expensive or they couldn't scale to that level. I know we took down a couple of providers when we tried to turn them on past 5 or 6 percent. So I think the other thing, and they handle it by sampling. And so the other thing that we really wanted to solve was being able to deal with the mobile scale, which is millions and millions of devices. [0:07:26] Noah Labhart: I'm curious about then from that point, so that MVP is built and you're achieving what you want to. I'm curious about how you progress it from that point and matured it. And I think to wrap that in a box a little bit, what I'm looking for is how you build your roadmap. How do you go about deciding that, okay, this is the next most important thing to build or to address with BitDrift? [0:07:45] Peter Morelli: I think we built a lot of the core infrastructure. And I'll go into the sort of the next few generations that we built. Right now, it's very customer focused. We're very lucky to have very large customers and a lot of customers coming to us. And so we have a very priority-driven approach. We try not to build point solutions like just one officer or a customer. And so what are the ways that we can extend our platform in a way that benefits lots of customers? And so we tend to prioritize them based on the customer requests coming in. And though we have a pretty healthy sort of roadmap for the long term, and we make big investments where we see, I think a lot of it is very customer-driven now. I think early on, we were our own customer, and so we had a lot of pain points. I think the next thing we did was we realized that we now had reliable upload of a lot of telemetry that you can collect. A lot of that data was never being looked at, right? That's actually true of most observability systems. Like 90% of the data is never looked at. It's only the bad conditions. And so why were we wasting all this bandwidth and storage and ingest for data we weren't looking at? And so the next thing we did was add a little bit of processing at the edge. So instead of saying, hey, I'm going to upload all these logs, maybe I just summarize or metricize them at the edge. And so instead of megabytes of logs, I could send very small counters. Saved a huge amount of bandwidth and really allowed us to create metrics on the fly based on what was happening on the device. So that was a really powerful feature we added. And then the next thing we did was making this all runtime configurable. Now, most observability systems are, you make decisions at compile time. You add a log line, you add a metric. is done when you compile and then you release. If you're doing five or six hundred releases a day on the server side, which is what we were, that's not a problem. That's like a few minutes or 10 minutes, like 20 minutes of delay. On mobile, an average release cycle was anywhere between 10 and 15 days. You have your weekly trains, you have your alphas and betas the next week, then you have to go to the app store, you have to get it approved, and then it has to propagate to everyone's customer devices. So by the time you hear about a customer problem and add a log line, all of a really long delay and god forbid you didn't get it right you'd have to do that again and then after all that you'd have to turn it off at the end because it was so expensive so the other thing we did and this is i think one of the really things that unlocked a lot of the rest of what these set of people i can but runtime choose what i want to do and so observability has now become these set of people i can but runtime choose what i want to do and so observability has now become runtime for mobile which makes it really nice you can say i heard this problem get more information anymore, turn it off. And that's something that used to take you weeks or months, and now you can do it in a few minutes. So you combine like the local storage, the ability to edge process, and the ability to be able to turn it on and control it on runtime. We built that last part. That really is the core of the platform. And we've layered all the sort of traditional usability use cases on top. [0:10:40] Noah Labhart: I'm curious about team. How did you go about building your team? I know some of the folks came from Lyft. I'm curious about what you looked for in those people to indicate that they are the to join you. [0:10:50] Peter Morelli: For us, going from a larger, more established company to a small startup where it was just going to be a little bit more chaotic, you needed to have people who were in for that type of ride, whether they'd done it before or were interested in doing it. You're looking for people who are self-starters, who understand that someone's not going to be sitting there telling you exactly what to do every single second of the day. We were also going to be a remote company, remote only. There's no central office. We're still like that. And so we generally skewed who had done things across a wide variety of technical areas. They weren't just a specialist and just were willing to be able to understand and go after problems on their own. So think of self-starters. And so we took about, I think about a third of the team that we were working on when we spun out of Lyft. We've since hired specifically for that style of engineer. Again, tended to skew very senior. It's harder to have it as a junior engineer, just to have no person sitting next next to you and helping you coach. I think it's one of the tougher problems the industry faces now, but that's how we selected for it. And obviously you look for the highest talent that you can. And I think I've been very lucky in my two co-founders, which some of the best engineers I've ever worked with. They are the best engineers I've ever worked with and they tend to attract that talent. And I'd say of the initial team that's been out of Lyft, we probably are still have two thirds of them. [0:12:10] Noah Labhart: Okay. I'm curious about scale, right? And specifically this type of a problem, especially when you solved it early. You're collecting data on the device, but then you've got to scale and get that data somewhere. And it's a lot of data and all the things, right? I'm curious about how you approach that in the beginning, but I'm also interested in, have there been interesting areas where you've had to fight that as you've grown? [0:12:31] Peter Morelli: The fun part of this is that we, this was originally built to solve lift scale, which is tens of millions of mobile clients communicating every day. And you have the the drivers and the riders and they're all trying to talk to each other in real time. So a nasty problem in terms of scale and something that we had to solve as we built this. So out of the gate, we, I think, had the ability to get to tens of millions of devices. And as we started talking to various customers, the ones that were the most interested in what we did were that size or bigger. And so we have a lot of very large, we're installed now over a billion times. I think concurrent connections because a lot of our clients have these real-time use cases. We have a streaming company in India that they were streaming cricket matches and hitting 120 million concurrent connections a day. There's actually a great post we did with the Amazon technical teams about how we were able to scale with that. So I think very quickly we started to get customers at the scale that pushed even where we were. But a lot of it is really how you think about building these systems in a resilient way. I think I'll credit my co-founders who've done this at many companies beyond Lyft, like and Amazon, all sorts of places where you've had to deal with sort of this type of scale. And BitDrift is built with that in mind, because I think the whole point of it is that it's as efficient as possible with the resources that it has, but it still has to deal with consumer scale and mobile devices. Just to give you a sense, I think, like Lyft, I think, was ingesting 45 terabytes or more a day of data from mobile devices. And again, like most of that wasn't being looked at. We have customers who 70% of their data bandwidth was being used for telemetry, not for their actual customer production usage. And we can come in and cut that down to 2% because of how the system works. It keeps data at the edge on the devices until something on the control plane, our server layer that says, hey, what am I interested in? What observability do we need right now? Sort of says, hey, go out and find this. Inherent in the system, there's a very different way of thinking about data storage and architecture and where it is. having this one big database that you have to scale as you dump everything possible in the world at it, nip sharded or split the data, it's still a vertical scaling exercise. There we have a much more of a distributed approach to how we collect and use data. That fundamental architecture gives us huge advantages in terms of how we scale the level of data that we're able to collect and also pricing, which is what you'll see. The redesign that we did helps us do that scale, but there's a lot of systems thinking in how we built the system to be resilient, a lot more failure. Like I said, the data center is a lot more of a sanitary environment. It's much cleaner as opposed to mobile phones. Just think of your mobile phone. How many apps are you using in any given day? You use Wi-Fi, then you walk outside, then you're driving down the street at 50 miles an hour, switching cell towers, and maybe it starts to rain, or like a concert gets out in your neighborhood and saturates the cell towers. There's a lot of noise in the system. And I think building for that is one of the things that BitDrift had to do very early on and has continued to invest in. [0:15:41] Noah Labhart: So as you step out on the balcony, you look across all that you've built. With BitDrift, what are you most proud of? [0:15:48] Peter Morelli: It's taken the focus away on observability of managing the spend and managing these data flows and putting it squarely back on the customer experience. You spend all these people and all this time saying, how do I get this data in there? How do I pay for it? Okay, who shouldn't log now and who should log there? feels like the incentives were really misaligned. It was all about like a tax on your system. When in fact, you should be saying, are my customers having a good experience? And not just the main ones, but every single one, right? Like you don't have that nice clean paraded curve of like everything is a big sort of fat 80%. You have a very long tail of terrible experiences. And most teams are getting to 10 or 15, maybe 20% of them just in terms of prioritization, in terms of engineering. hearing. And I think this system allows you to address all of those things. You're not missing the things that you normally would drop or normally would sample away. You're able to like now access it. Like we just released an AI layer on top of our platform that allows agents to go out and do this. So it's not just humans doing it. The agents can go out and do a lot of the investigations and some of the fixes, propose some fixes. And so all of a sudden you've moved what I think the industry standard is of addressing a very small percentage of the issues, smaller than most and being able to say, actually, now we can actually do really awesome apps and the customers are going to have a great experience of it. So I think we need to shift the industry toward that. I like working on things that shift the industry forward a bit. And I think it is a sort of a shift in how you're allocating your time and your dollars and observability. And I think it's a much healthier one. [0:17:23] Noah Labhart: Let's flip the script a little bit. Tell me about a mistake you made and how you and your team responded to it. [0:17:29] Peter Morelli: I think the early contracts that you do tend to be, you're trying to get your customers, you're trying to get those things. I think there are certain ones where we cut too good of a deal, I think, to basically we're either break-even or losing a little bit on some of the original deals. I think we caught those quickly, and a lot of those, I think we fundamentally believe in our pricing model, which is different than everyone else's. And I think it aligned incentives in a good way, and that we were able to work with the customers and get to, I think things that we did not expect led to very high cost overruns on our side. And we were able to handle them with the customer and get to a pretty healthy state. And a lot of that was very good engineering to help the system scale well. And we're fortunate to have great customers who are going to work with us and say, okay, that makes sense to us. We can happily tweak this or how we use it on our side to make it work. And those are still customers that are with us today and are growing with us today. So I think for the most part is we try to best to predict what, how people would use our systems, but everyone is very different. The real world is really interesting. And so not everything was optimal. Those are sort of the first few conflicts that we made. I think those are the ones that like highlight to me or the things that we had to spend a lot of time on. There are lots of features that we thought would be really popular that didn't end up being, that we had to recover from. Some scale decisions we made early on that were painful that we had to fix pretty quickly as we grew. pretty standard in any growing company. [0:18:55] Noah Labhart: Okay, Peter, let's move forward then. This will be exciting. I'm curious about what the future looks like for BitDrift. The industry is moving very fast. Where things are heading with AI and the way people are viewing software. Tell me what the future looks like for BitDrift. [0:19:10] Peter Morelli: I think it's still super exciting. I'm one of those people who think AI is like a net positive to engineers. And I think I've seen the best engineers even better. I think they're very powerful tools. I've seen our customers use it in fantastic ways. I think things that used to take weeks or months to integrate our systems and start using us now take a day or two. And I think we've really been helped by that. And I think I've seen our customers, both their internal development, as well as interacting with us, it's greatly accelerated. I think that where do we see that going? What parts are going to be built? What's That'll be interesting. I think we're in for a huge amount of change in how things are going. I think for us, though, when I look at what we provide, we're giving customers access to a data set that they typically have not had access to. They have sampled it at 1%, they haven't done it, they haven't logged enough, or they've lost it because they haven't been able to get it due to instability. So I think we're giving both their customers, engineers, and their agents a lot of the data that they really haven't been able to use before. That's great for existing mobile applications and solutions. What I've seen happen is that this acceleration, we made software cheap to build, not as cheap to maintain and observe. But I see us continuing to invest in how do we make this more automated? Like I said earlier, capture more of the issues that people are seeing and facing. And beyond that, it's an expansion beyond just people and mobile phones and interacting, computing moving to the edge in all these different ways. it's only going to accelerate like how many devices are now being built at the edge your tv is running android right most kiosks that you see around the world are running all the variants of android or linux so i i see that compute at the edge is just happening more and more we have several customers who are effectively devices and not mobile phones so i think software is only going to get more prolific it's only going to get more expanded beyond just our core business of mobile apps which is doubling and tripling the you know submissions to the app store you're going to it permeate the rest of our lives even more. So for me, that's exciting. I think it's an interesting era to live in, which has a little bit of chaos and the industry is, like you said, is moving super fast. So what worked one week does not work the next week. So I think you'll, you have to be able to roll with those punches and comfortable with that. I find that exciting. [0:21:41] Noah Labhart: Good deal. Okay. Let's switch to you, Peter. Who influences the way that you work? Name a person or many persons or something you look up to and why. [0:21:50] Peter Morelli: I feel I'm always drowning under a huge amount of work. So it's interesting. I think my co-founders do. They both have different ways of approaching work and thinking about systems in a very deep way. I go back and a lot of my job has been hiring engineers and groups of engineers. And they're always the people that have influenced me the most have been those spectacular engineers that you've worked with. And you just watch them as they approach problems and decompose them. The best ones knew that the business mattered as well. They would build software in a way and technology in a way that would serve the business. And for me, that was always the thing where I was like, I learned the most. The other one was, as I'm in my new role, I do a lot more sales and marketing. And those are just areas that as a VP of engineering, you were peripherally aware of them. They were important. You enabled them. But it wasn't really the core thing that you would spend your time on. And now that's what I do most of my time on. I think it's like a whole new set of people and industry leaders in that area. And it's, for me, been great to learn. That's also been frustrating. Sales is a frustrating experience, a lot of rejection. And I think, for me, it's been great to stretch what my set of expertise or knowledge was that I would apply here. [0:23:08] Noah Labhart: Okay, Peter, last question. 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. showed off to you right there on the plane. What advice to give that person having gone down this road a bit? [0:23:23] Peter Morelli: I'm going to assume that it was a very technical entrepreneur, given that's sort of my world. But I think not to underestimate the story that you tell around these things. I think a lot of times every engineer does this, no matter how experienced they are, they focus on the technology. They tend not to focus on the customer and the story and how the people will use it. And so So one of my formative experiences was working very early at Salesforce. I was like engineer 30 or 40 then. And I remember how Mark Benioff made every engineer go through customer support. Customer support people were on their team, right? And it was such a customer-focused company as opposed to a technology company that had customers. That's always stayed with me, no matter where I've gone, is just to say, hey, you need to understand your customer deeply time with them, more time than you have, and understand what they are. So that would be one of the pieces of advice. The other one would be, do not underestimate how hard it is getting what you do and how awesome it is in front of people. Everyone hears and sees the viral explosions of things, and we've seen a lot of them these days. But for the vast majority of products, it's really hard rising above the noise. And there's a lot of noise and a lot of speed because it's easy to generate software these days. So that part of being an entrepreneur, I think, is the harder and more underestimated one. Everyone focuses on what they know, which is technology. And I think the other parts are actually equally as hard and equally as interesting problems. And so they need to spend more time on that. [0:24:57] Noah Labhart: I think that's amazing advice. That's fantastic. Peter, thank you for being on the show today. And thank you for telling the creation story of BitDrift. Thanks very much. 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. And when you get a chance, leave us a review. Both things help us out tremendously and Thanks again for listening.