S6 Bonus: Ending the API Debugging Nightmare: Building Real-Time Observability Networks with Vedran Cindrić of Treblle [0:00:00] Vedran Cindrić: I think as a developer you always try to build something beautiful, you want to make that perfect, but it rarely, rarely starts out that way. Scaling in our case is very, very important because you're adding our piece of code onto your API and we first have to handle all the load that you have, and secondly, we cannot slow down your API. Those were the two guiding principles that we had when we started designing this product. We cannot slow your API and we have to be able to have the same amount of load that you have and we have to do it at cost. My name is Vedran. I'm the co-founder and CEO of Treblle. [0:00:47] Noah Labhart: This is Code Story, a podcast bringing you interviews with tech visionaries 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 Vedran Cindrić built the tool to make it easy to understand what's going on with your APIs. All this and more on Code Story. Vedran Cindrić grew up in a small town in rural Croatia. As far back as he can remember, he's been tinkering with computers, messing around with DOS, and of course, gaming. From the very early days, computers became his passion. When he finished college, he started his own successful design agency before building his current venture. He likes to watch movies and TV shows and loves to barbecue. In Croatia, they don't smoke meat as much as we do in the States and stick mainly to pork over beef. One thing I loved that Vedran said was the best way to eat a salad is when you're having barbecue. Otherwise, you wouldn't eat a salad. When business was booming, Vedran and his team built a tool to help them track all of the APIs they were supporting. After putting it down several times and picking it back up, they finally figured out how to scale it properly and decided to finish building it and share it with the world. This is the creation story of Treblle. [0:02:23] Vedran Cindrić: So we like to say that Treblle makes it super easy to understand what's going on with your APIs. And that's like a really nice marketing term for it. Essentially, it's a service that helps developers build and ship APIs faster. So essentially, we built an SDK that you add on top of your code in whatever language you want. And out of the box, we give you real-time API monitoring, logging and error tracking, automatically generated and updated documentation, API analytics, quality score, and much, much more. So we're like basically the Swiss army knife of API development. And if you're doing something that requires an API, we can definitely help you understand things much easier and build things much faster. When we were at the agency, we always liked to keep the team small, right? So essentially, it was always me kind of at the helm. I like to be involved in day-to-day development. I still do to this day. We used to do a lot of apps and APIs. So we probably at one point got to a number of like 50 simultaneous apps and APIs that we were maintaining and updating and working with other developers on multiple different parts in that ecosystem. system. So it really got to a point where I was basically, I would wake up at like 8am my time and go to sleep at like 11pm my time and literally work most of the day because by the time I would finish my day around 5pm our time, you guys in the US, New York, LA, etc. would wake up and we would have to provide support to developers there. So it became really kind of counterproductive and And especially when we worked with developers who were maybe remote, like in India or even in the US, a lot of the confusion around APIs was mostly stemming from the fact that nobody actually understood nor saw how that was working or what they were doing. So you would have a developer in the US sitting next to my client who claimed that the API wasn't working, even though he didn't authenticate well. right and he thought he did everything okay but he didn't understand it he didn't see what he was doing wrong we started thinking okay how can we at least prepare for the day so by the time we wake up we at least have enough data about what everybody did while we were sleeping so we can understand what everybody else will need and we started developing this logging tool that would at least help us understand okay this is what happened this is what they were doing this is who who was doing it, from where, et cetera, et cetera. And slowly but surely, we started kind of adding more and more features as we use the product on various production APIs. We, at that point, of course, just like everybody else, had a scaling problem. Our problem was basically we needed to be able to scale as much as the API that we were being added to. So if your API had a million requests per month, we needed to be able to handle a million times whatever the amount of projects we had. I would essentially in that period until we figured that part out, I would turn on Treblle in the morning when I would wake up and I would turn it off before I would go to sleep just so it doesn't crash, you know, my client's APIs and servers and etc. We wanted to drop the project because we never could figure out the scaling part. And then randomly just basically working on something else and watching a few AWS videos in the background, I kind of got the idea on how to solve that. immediately said to Darko and Tia, you know, I figured it out. Let's finally build this. You know, now there's nothing stopping us. [0:06:11] Noah Labhart: Well, let's dig into the MVP then. So you start to build it. Tell me about that first product you built, how long it took you to build and what sort of tools you used to bring it to life. [0:06:22] Vedran Cindrić: Like I said, we dropped the product a few times because of scaling issues. Like we had two problems. We were always worried it would cost us too much to scale. And we were also worried about slowing down the APIs that we were attached to. So I tried to do it like in blast. So I would work on it for like 15 days, couldn't crack it, just give up and then pick it up in like two months and try to do it again. So I would say that figuring out the scaling part lasted like three, six months or something like that. Once I figured that out, we started working on it, I would say, more intensively. I mean, we've been in the business for 10 years. scope creep works, how to build a real MVP, if you will. So we said, let's just make an interface. Let's see how it works for us and then we'll take it from there. So we literally built something, I would say within a month and we got the interface that we wanted. And then we started slowly, literally dividing things into, I would say sections or if you will, and then knocking out that section. So we would do analytics, then not only do that for like a month, then do something else. So I would say the entire process from start to finish of building Treblle to what it is I would say today was like one year of working on the side our agency and I have to say like when it comes to tools we use Trello a lot and I think if we didn't use Trello, Treblle would not exist today. We literally, I would organize everything from the smallest bug to the biggest general broad direction we want to take it into Trello And I think it was very helpful into making sure that I was accountable enough to knock off those tasks. When we log into Trello and see like 30 pending tasks for Treblle, you know, you just inherently want to complete some of them. So Trello has helped us a lot. We, of course, just like any developers, used a lot of GitHub, a lot of Sublime and a lot of AWS. [0:08:19] Noah Labhart: With any MVP, you've got to work through certain decisions and trade-offs. And, you know, there's little tidbits sprinkled into your description of the MVP, but let's dive into them a little bit. So what decisions and trade-offs did you have to make when building that MVP and how did you cope with them? [0:08:37] Vedran Cindrić: Like I said, I think we had like 10 years of training before we built Treblle. So I say we had real experience of how to do it and how not to do it. So we really were very strict on the amount of features that we wanted to add in the MVP. And even now, like if it's a good feature, yes, we will add it, but not until we look at the bigger picture. Right. So in the original MVP, we didn't actually have a lot of the features that we have today. We had real time API logging. We had error tracking. That was like one of our core things and automatically generated documentation. We didn't have a quality score of the API. we didn't have API analytics, we didn't have running tests, we didn't have any of that. So basically the idea is let's just get the data into our system and then we'll figure it out step by step. And that's what we did. You know, you're dealing with a lot of code that is not your code. We always kind of said, let's try to make it work on most of the code bases and most of the APIs. And we'll deal with the exceptions because there are always exceptions in the end, We would cover 80% of the cases we knew about, and then we would spend some more time after the 80% was done to fix the 20% that were like weird edge cases, exceptions, et cetera, et cetera. Like I said, in the original MVP, we did a lot of things just to get it up and running in a sense. And of course you have to catch up with the things that you didn't do. So we did spend a period of time fixing those and updating those. You know how that saying goes, better done than perfect. that cannot be more true because if you're building something and you're not sure if it's going to work yes everybody wants it to be perfect bug free perfect look but it's better that it's done and most people will like i said forgive you if you have a problem or error or they will tell you hey something is working and then you'll get a chance to fix it rather than if you wait two years and then pump up something that people simply don't want and i think some of the ideas that are now part of Treblle, like, for example, the API analytics, like the quality score. These are ideas that, you know, other developers and other clients of ours have told us, hey, it would be really cool if we could get this. And, you know, that's what we did. We listened to what our customers are saying. [0:11:02] Noah Labhart: How did you progress the product from there? You've got, you know, a solid product. You're hearing feedback from the market. How did you go about progressing it? And how did you go about building your roadmap and deciding, okay, this is the next most important thing to build? [0:11:19] Vedran Cindrić: I've always been a strong proponent of, you know, testing things and throwing things into the fire and seeing how they come up on the other end. And we actually, as soon as we got the MVP running, we talked to a few of our clients and got this up and running in production APIs within like a few weeks. Once you're in production on real servers, things change, right? Whenever there's a problem, you try to immediately solve that problem, understand what the problem is. You no longer have the luxury to basically sit around, wait, think about it, et cetera, et cetera. You have to act because you are responsible for somebody else's app, somebody else's website at the end of the day. As far as the things that we missed, bug fixes, etc., etc., I would say it was like a speed crash course into some of these things that we didn't know. And we essentially fixed them as soon as possible. The only thing when we were maturing the product, our clients were always a mix. So we never had only just the developers. We had like a steady flow of different roles. So we would have developers, we would have CEOs, we would have CTOs. All of them had ideas about where the product should go, what they wanted to see. So we always kind of tried to listen to all of those, I would say, three, four different worlds. You know, we would pick what was the most common and most repeating problem or issue that they were having and then implemented that into our product. So I've mentioned a couple of times the analytics section and the scoring section. This is something that actually everybody kind of hinted, but they weren't using the same words, right? So you got to figure out what they want, what exactly, how, et cetera, et cetera. And we also have to be very privacy focused, of course, when dealing with these things. So I would say we added features that we wanted to see first and foremost. And then we added features that we gathered based on the feedback. And like I said, the more you're added, the deeper you are, the better the product gets. And I think one of the advantages in our case is that we literally were the guys who were doing this on a daily basis. So we were producing apps every day. We were producing APIs every day. We were living that world. So we knew exactly what the pain points are. as far as the roadmap i mean with this product the roadmap kind of writes itself you know most most of the time we we also had a lot of ideas clients tell us ideas ideas come to us in the weirdest ways and in places but generally in terms of our broad roadmap right now i would say we are focused more on understanding internal apis and then in the future we want to make make it so that that anybody can turn their internal API into a public API with a click of a button. Because we know how your API works, we can literally produce you a staging or a development version of your API without you having to launch servers, without you or the developers have to do anything, etc., etc. As far as my personal pet peeve is, we want to make sure that when you see an API, you can integrate that API as fast as possible. In most cases, that means you have to understand, like, you're basically, whenever you're integrating an API, you go find a client that makes HTTP requests in any shape, way, or form, any platform. Then you need to understand what models you need and what you need to send. So essentially, because we already have all of that data, the idea is that we generate a lot of this stuff for you. Our thing is we never want to replace developers, right? I'm a developer myself. I take a lot of pride in what we do, but we want to kind of help the developer focus on what matters and what they really like is writing code and not basically exploring documentation, figuring out what they're sending, what they're not, etc. Those are some of the broad strokes in terms of where we plan to take the product in the next six months to a year. [0:15:27] Noah Labhart: Let's switch to team. So how did you go about building your team? And what did you look for in those people to indicate that they were the winning horses to join you? [0:15:37] Vedran Cindrić: I was very lucky to have a co-founder that stayed with me, I would say, for the past 10 years, Darko. So we co-founded the agency together. When the opportunity came with Treblle, he immediately jumped on it, just like me. So from that sense, I would say we were in sync for the past 10 years. Tia, who's our mobile developer, has joined us like five years ago. She has been a huge help to us in terms of what we're trying to do on mobile with Treblle and some of the other stuff that we're doing. So I would say the core team has always been there throughout the agency. These are people that will simply get the job done because at the end of the day you need people who will get the job done and not talk about how to get the job done, right? It doesn't matter if it's like research, marketing, manual labor, setting up IKEA furniture in the office. This is the team that will do it. I can lean on any of them at any point in time. And if I'm not in the office, I know everything is still going to run relatively cool. Like I said, we watch everything to the prism of what do you want to achieve. We have one rule. We only work, we'll hire you if you like what we're doing and like working with us. Because fundamentally, if you don't like what we're doing and don't believe, you don't have to work with us. You can be the best programmer. There is no hard feelings. But, you know, we're looking for people who have the same passion as we do around fixing these problems, around helping other developers make their life easier, et cetera, et cetera. So I think when we talk about the team, we look for people who like, I don't know if I could curse, but get shit done as you guys in the USA. [0:17:20] Noah Labhart: Well, let's talk about scalability. So, and you mentioned this early on, you know, when you're talking about kind of pre-MVP or working through using the product in your agency and talking about scaling. So, it'd be interesting to see where you start with this question. But did you build this to scale efficiently from day one or are you fighting this as you grow? [0:17:43] Vedran Cindrić: Whoever tells you they kind of build it from day one is lying. is like. So you always start by chasing that dream, right? I think as a developer, you always try to build something beautiful. You want to make that perfect, but it rarely, rarely starts out that way. And like I told you, we dropped this project twice because we couldn't get the scale to work. Scaling in our case is very, very important because you're adding our piece of code onto your API and we first have to handle all the load that you have and secondly we cannot slow down your API. Those were the two guiding principles that we had when we started designing this product. So we started exploring a lot of solutions. I mean just when you say scaling you you immediately think of serverless so that's where we kind of inherently started looking at. I would say we use a lot of serverless technology nowadays but i can tell you that we are at the end we are heavy users of s3 the magic of our system is it's so simple that it's beautiful right it's it's it works because it's simple and and we managed to do that with AWS and a lot of the things that they're doing uh in s3 and we struggled a lot with that and sometimes we even struggle today even though we set things up. Truly, nowadays, there's no way we would go down and impact your API or slow your API down. It's just a matter of when we will process the logs. We've so far been able to process every single log within 400 milliseconds, which is really good for us. And we went from processing 200,000 API calls in July, I would say, to about 4 million API calls as of today. [0:19:34] Noah Labhart: Well, as you step out on the balcony and you look across all that you've built, what are you most proud of? [0:19:40] Vedran Cindrić: I would definitely say the big picture, like that would be the scaling part. I've been in this business for a really long time and people often think, oh, you know, when you see a complicated and scalable solution, it must be complicated. It must be so hard. There are so many moving parts. But I think that the most profitable, most functional, most beautiful products are actually the simplest products. in its core. So I think the scaling part is something that I'm very proud of. And then when we dig into small details, like there are a million things that we've kind of managed to do. One of the things that Treblle does is essentially it detects the details of your device. So let's say you're building a mobile app and you have an API, right? Treblle can tell you which OS are you using, your user is using, which version of the app that user has installed, etc, etc. And if you that we could do all of this without actually having physical access to the device. The beauty there is we had to probably research like for the past 10 years what Apple has been calling their iOS versions, how they're structuring their HTTP requests etc etc in order to be able to figure out okay when when an API call is made it was made from iOS for 1501 and the app version is this. So So I think we've made a lot of good tech around this. [0:21:05] Noah Labhart: Let's flip the script a little bit. So tell me about a mistake you made and how you and your team responded to it. [0:21:12] Vedran Cindrić: I make so many mistakes on a daily basis that it's ridiculous, right? So it's not one mistake. It's many mistakes that we've probably made. Even today, architecturally, we still have things that we want to refactor, etc., etc. I would say that on that front, usually the team keeps me in check. That's very important when you have a team that will hold you accountable, but not in a bad way. Nobody's like going to shame me, but they're going to tell me here, you're doing this incorrectly. This is bad. This is slow. This is what you should change, right? So I remember whenever the system would be slower than what they are used to, I would say slower than instant they would immediately text me. Hey, I tried using it and I Got like maybe a few milliseconds of delay. Can you check what's going on? And even to this day like sometimes they they they're like, hmm this this came into the system like 400 milliseconds later Could we do it maybe faster and that's always like it's it's it's I would say it's a curse, right? They they try to keep me in check I try to keep them in check as well. And I think it's okay to make mistakes as long as you're aware that that is actually a mistake. And at one point, either you will fix it or it will fix it for itself. And then you don't have control over how that's fixed. So definitely, I would recommend trying to recognize when a mistake happens and trying to figure out how to solve it as soon as possible. [0:22:46] Noah Labhart: What does the future look like for the product and for your team? six months to one year timeframe. What about beyond that? [0:22:55] Vedran Cindrić: We're building right now, besides everything that we're doing on the web, and I would say I call this the platform. We're building this whole suite of mobile apps. We're building a native all-in-one Mac, iPad, iPhone app for iOS. And again, it's not going to be React Native. it's not going to be something else, it's truly done natively in SwiftUI by our developer Tia. I think that will change the way people manage APIs, understand APIs, especially on the go. I can't tell you how many times I went for lunch and was pulled into a meeting from lunch because there There was a crisis, quote unquote crisis. And when we would jump on the meeting, there was no crisis. That could have been avoided only if I had access to the data that Treblle gives me. So I think when we kind of ship this out, it's going to really change the way people are building, testing, analyzing APIs from the day they start working on it to post-production, I would say. Another one is documentation. documentation. So we're definitely more and more interested in understanding deeply, deeply how your models are structured in documentation. Our end goal, to be honest, is to remove the need for documentation because I think people mostly, when you think about how you learn things, right, most people learn things by example. So if you're learning math, you'll try to solve a couple of equations. You'll learn it by example. When you're learning how to develop, you're learning by code out, you're trying it out. I think it should be no different for APIs. Right now, everything is kind of dependent on you writing perfect docs or getting perfect docs, et cetera, et cetera. But I think in the future, it's going to be more about, hey, here's how the response looks like after you tested it. This is what you can expect. Tomorrow, that might change. You should should check again or be notified when that changes. The problem nowadays is you could have API docs that are valid today and tomorrow you could change five different things so it's very agile in that sense and we're looking towards moving the needle in more from traditional ways of documenting into more example based documentation. And I'm very excited about kind of helping speed up some of the traditionally long processes like setting up a staging mocking the data from your API. I would say one of the best things that we would like to do is maybe designers could maybe create interactive demos from Sketch or Figma by really interacting with the API directly from there. So if you needed a name, if you needed to log in, a designer could literally connect these dots from like Sketch or Figma to the external API and essentially, Essentially, you know, make sure that workflows and testing and stuff like that and mock-ups can be done much quicker and are more realistic than what you have today. [0:26:09] Noah Labhart: Let's switch to you, Vedran. Who influences the way that you work? Name a CEO, a CTO, an architect, really any person you look up to and why. [0:26:18] Vedran Cindrić: It's hard not to answer that question from a technical perspective. perspective on a smaller scale I would say I admire a lot what Taylor Otwell is doing with Laravel and basically if he didn't do such a good job with Laravel and some of the stuff that they did there we probably wouldn't have built Treblle so I really like the open source approach I really like the dedication to I would say perfection to making sure things are not just work well but are actually beautiful and then another guy who I'm closely actually following is a guy called Jack Ellis from Fathom Analytics, he's building like this privacy focused Google Analytics replacement. And he has so many great blog posts and ideas about scaling, about infrastructure, etc. So I would say a lot of them impact my way of thinking about approaching problems, approaching how we build things, how it scales, etc. If I had to say on like a bigger scale, I really like what Satya Nadella is doing with Microsoft. I mean, if you think about it, they went from being the most, I mean, not the most, but pretty hated, right? In the tech community to now owning GitHub, even competing with Microsoft Teams, having like this vibrant developer support with Azure and just the Surface devices. I mean, in general, he, I think, did a really phenomenal job turning the table for Microsoft and kind of now being viewed as somebody who's also now like a really nice startup. I'm not going to say almost like Apple, but close. Then I've been following like for the longest time, I've been following Kevin Rose. And I don't know if you know, he's like the co-founder or founder of Digg. And I always watch his podcast Ignation. following him forever. He also, one of the good things about him is he was also open to admitting when he failed and he failed many times and he would openly say how he failed. He would essentially describe the failure, which is, I think, the best thing somebody could do for you. Here is how you're going to fail and where. And I think you could learn a lot from people that actually try to do things. [0:28:40] Noah Labhart: Well, we talked about a mistake, but 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? [0:28:50] Vedran Cindrić: If you can try to predict all the architectural styles and problems that might occur before you go into production, that's probably the best advice I could give somebody and even myself. And that's where I would start to change things if I was doing it again. four million API calls, I don't have the luxury to just maybe, you know, migrate the data and just kind of change MySQL tables, et cetera, et cetera. So I no longer have the luxury nor the speed to basically re-architect quickly, right? You can always do it, but it's always like a very stressful thing and painful. So I think you should get the fundamentals of your product, at least the core core parts good and ready before you kind of move to production. Because once you do, like I said, it's a different ballgame. You have to make sure you're up and running. You're not slowing anything down. Your customers are happy. Your people are happy. So I think I'd focus more on the core parts of our product and making sure architecturally they're good, even at an expense of not adding all the features. I would rather have the core working perfectly than anything else. [0:30:01] Noah Labhart: last question, Vedran. 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 i can't wait to show it off to the world 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 [0:30:17] Vedran Cindrić: you know just get it out the door don't wait don't overthink things most people will forgive forgive you if you do stupid things. If you have something, go do it. Go get it out the door. See what it feels like. Don't be afraid of feedback. I think feedback is the best thing anybody can ask for. People will literally tell you, you know, you're doing this good, this bad, and you can get probably the most valuable information just by talking to your clients clients and customers. [0:30:50] Noah Labhart: That's great advice. Well, Vedran, thank you for being on the show. Thank you for telling the creation story of Treblle. [0:30:55] Vedran Cindrić: Thank you very much, Noah. It was a real pleasure. And [0:31:01] Noah Labhart: 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.