Code Story · Transcripts

S5 Bonus: Slashing the Cloud Bill in Half: Automated Kubernetes Optimization with Leon Kuperman of CAST.ai

October 28, 2021 · 44:10
Listen to the episode Download .txtDownload .vtt
Leon Kuperman

If you ask customers what they want, they will ask you for a better mousetrap. In other words, they only know what they know. They don't know what that leap is yet until they have it in their hands. We didn't start the product management process by going and interviewing a bunch of customers and saying, okay, we think that cost is a problem. Tell us about all of the pain points you have in your existing cost tooling. There needed to be some kind of radical shift in thinking that would create a 10x benefit. And that takes a leap of faith that takes sometimes months to validate. Months. My name is Leon Kuperman. I am the co-founder and CTO at Cast.ai.

Noah Labhart

This is Code Story, the podcast bringing you interviews with tech visionaries 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 Leon Kuperman created a way to optimize your Kubernetes and cut your cloud bill in half. All this and more on Code Story. Leon Kuperman comes from an immigrant family who migrated to North America in the late 70s. He was born in a city that is now part of the Ukraine, but grew up in Canada. So he was brought up in Western society, but closely observed his parents and their immigrant background grinding as entrepreneurs throughout Leon's life. He's a brown belt in Brazilian Jiu-Jitsu and has been training for over 15 years. a lot of his time outside of tech. Funny enough though, when he was living in Seattle he was part of a group of people from Oracle, Amazon, Microsoft, etc. who all did martial arts and he finds that there is a correlation between jiu-jitsu specifically and tech. He's married with three kids and of course likes to spend time with his kids in different ways. His older son actually trains with him in martial arts and also does tech, building Raspberry Pis and engineering different things. Leon also plays the piano. Coming from a Russian family, it wasn't an option not to. At his prior startup, Leon and his CEO would get into conversations about, you guessed it, his cloud spending bill. He knew that the usage was justified but could not point to why each piece of infrastructure was allocated. And further, he could not automatically optimize it and reduce the bill. This is the creation story of Cast AI.

Leon Kuperman

So Cast is a company that helps customers optimize their cloud environments in a very specific way. So we're optimizing for cost and performance, but we're optimizing in a fairly narrow scope. Whereas if you'll have some companies say, oh, we'll meter your costs, we'll give you some recommendations, and then you can take action on those recommendations and lower your overall cloud bill. We recognize that cloud bill is a huge problem, but we also recognize that nobody wants to do the work manually and nobody's going to take a set of written down recommendations and try to implement those through a manual DevOps process. So we've come at the problem from a first principles perspective, which is everything that we do has to be a fully automated or autonomous approach. So when a customer gives us their cloud computing environment we install our components in such a way that once they turn it on, we are driving from that point forward, we're rebalancing and reorchestrating their workloads such that they're the most cost effective that they can be within a set of guidance parameters that our customers give us. So we made this bet early on at Cast that the world will move to containers over time. So we already have the vast majority of kind of lean forward coders and engineers deploying their workloads on containers. And then the question becomes, well, OK, you're going to containerize your applications. How are you going to deploy them? And we see that the vast majority of organizations will move to Kubernetes over the next five to seven years or some version or flavor of Kubernetes that is yet to evolve out of our current ecosystem. system. So rather than saying, we're going to go and optimize all compute environments, all possible application scenarios, we said, alright, we're going to focus on Kubernetes specifically. And the reason we're going to do that is because the rules of engagement are extremely clear. Everything is defined in the K8s world nodes, pods, workloads, etc. And therefore, that gives us a chess game to play, as opposed to kind of so it's the difference between AI playing a game versus AI trying to solve a general world problem. So by focusing and being very specific on scope, we're able to be much more effective and actuate the changes that we want to make in a cluster versus just some written recommendation. So Cast is not our first startup. I guess you could call us serial entrepreneurs. I've been working in startup world for for almost my whole career, with the exception of two bookends. So my first job was at IBM. I lasted about 18 months, maybe 24 months. And then I went and started my own thing. And then my whole career has been startup life up until I was a vice president at Oracle Cloud Infrastructure. And I got to Oracle through an acquisition of one of our previous startups called ZenEdge. One of the things we've noticed both in that startup and afterwards at Oracle was cloud cloud. So I was the CTO and my CEO at the time would come to me every month with the AWS bill and say, WTF Leon, you said the bill was going to be X and it's X times two or whatever. And yes, I know we have customers that we're onboarding, but this is out of control. And so the end result was we started at a couple thousand dollars a month in expenses on AWS. And by the time we sold the company, we were close to $200,000 a month. So like 100x growth in the bill. Not only did I not know where the resources were going, and I couldn't allocate them to individual microservices or applications, I had no mechanism to automatically reduce the bill. I would have to do a manual DevOps effort to say, say, okay, we're going to stop working engineers. We're going to stop working on features. And today is going to be all about cost or this month is going to be all about cost crunching. We're going to bring that bill down. And we went through all of the kind of denial and, you know, all of, all of the, all of the cycles of grief, we moved to these things called reserved instances where we paid a bunch of money up front to AWS only to find out that that bill still kept growing, Although we kind of slowed the pace, we looked at other clouds, but then there was vendor lock-in so we couldn't easily move to other cloud environments. And so although the company did very well, I always had this kind of pit in my stomach as this is a part that we failed on. Resource allocation and cost management was a fail. And then I noticed these trends at Oracle with customers and with the inside of Oracle, I noticed all of these capacity crunches, especially around COVID when there were no more, like there was a chip shortage and it still exists. And so it was really hard for these cloud environments to order new capacity. Like they had to order chips to rack servers, to actually extend their compute capacity. And all clouds were having a hard time doing this across the board. And so a lot of the effort inside of these cloud organizations was, all right, all of our service teams, X million cores out in the universe, we want 30% of them back to give to customers. And that was again, a manual effort for most service teams. So I thought, okay, there has to be a better way. What if there was an autonomous system that automatically looked at your application, saw how it was deployed and reorganized that application to the best possible compute, and then just did the migration for you and then kept it up to date and fully optimized at all times.

Noah Labhart

Well, let's dive into the MVP. Tell me about that first product you built, how long it took to build, and what sort of tools you used to bring it to life.

Leon Kuperman

We started with the data science projects. We started by early analyzing cloud economics. So what are all of the computers that exist in the universe in the cloud world? How much do they cost? Is there a way of normalizing those costs so we can tell how much does a MIP cost? Million instructions per second cost across the clouds. Are they comparable? So we started with a massive benchmarking exercise and we basically ordered every single instance. We boiled all of that data into a set of benchmarks as well as some cluster analysis to determine in an ideal world what would be the best set of shapes that you would want to use. In our MVP, we really focused on a pretty narrow use case. So we had a couple of MVPs. The first one, we said, okay, to do everything we want to do, we are going to need to build a Kubernetes distribution that's going to allow us to optimize because we want to have control over the API service, the control plane itself. And so we built a cast version of Kubernetes. And that also had the added benefit that we could think about multi-cloud distribution at the same time. So our first MVP was actually a multi-cloud Kubernetes. It works amazing for HA and disaster recovery use cases where you don't want to be dependent on a single cloud. So you get the cost optimization benefits, but you also get this kind of ability to distribute workloads across clouds seamlessly as one logical Kubernetes cluster.

Noah Labhart

So let's dig into the process a little bit. So tell me about, you know, with any MVP, right, you've got to make certain decisions and trade offs about how you shape that MVP, right? And maybe it was around those first set of customers you were onboarding and things. And you kind of you kind of touched on it with your explanation. But tell me about some of those decisions and trade offs you had to make in the beginning around maybe feature cut or technical debt or anything like that, and how you coped with them.

Leon Kuperman

So remember, I'm coming from a kind of an enterprisey world where I've already have services at scale. And I have this all this operational pain in the back of my mind. Like, so if we don't build these services robustly, what is the technical debt load that we're going to have six months from now? And I didn't want to go there. I just wanted to start with a very clean slate. late. So even as a very early engineering team of only five or six people, we started with some pretty robust processes. So before we had customers, we were doing outage five whys analysis. So when our first microservices went live, we started doing postmortems like, okay, we don't have any customers right now. There were no customers impacted, but let's get to the root cause and figure out how do we make sure that we build services that are robust enough. And this is cause analysis process. So it's not about pointing fingers, it's about saying, all right, how can we collectively improve our process so that we have enough time to pay technical debt, we have enough test coverage, we have enough feature build at the same time, we're continuously improving. So here are some of the things that we did intrinsically at the almost at the base level to kind of ensure that operational stability. Heavily invested in a CI-CD pipeline. So we We started with kind of GitLab, and then we eventually introduced Argo CD. So we have a pipeline that works really well right now. And kind of a testament to that is, you know how a lot of engineering teams say, oh, we have continuous delivery. Cool. Until you actually look under the covers, it's not really continuous delivery. I'm proud of the fact that our team can deliver 10, 15, I think today we had something like 30 changes delivered to production automatically. automatically. So that's kind of one major tenet is there are no staging environments, there's a dev environment, and there's a production environment. And everything in between is just pipeline. The second kind of core principle that we have is any new engineer that we onboarded had to commit code in their first day. So you join cast on Monday, Monday afternoon, you're ready to head home, you have a commit, and it goes to production. I love that. We just onboarded an engineer two days ago, two actually, and we asked them about their onboarding experience. They're like, we've never worked at a place where we were actually able to, never mind getting an email address on a laptop, we were able to actually affect a customer-facing feature on day one or two. So I'm really proud of that fact. The other major piece or the underpinning, we don't have a QA team and we don't have a DevOps team. There's just engineers. engineers. You write your code, design your code, you test your code, you deploy your code, fix the tooling if you need to fix it. And by the way, everyone takes an on-call rotation. So once a month, once every six weeks, you're going to be on call for a week or two. That's a 24-7 operation. So there's a high incentive to generate quality code and not to take any shortcuts. Because guess what's going to bite you in the butt six weeks from now or four weeks from now when you go on call is that crappy code that you might have written two weeks ago. So everything is an automated test. Some of these things are end-to-end tests, which are more elaborate. And then we use those end-to-end tests in two places. The first place is in the pipeline itself. So the deployment pipeline runs all of the tooling and testing, but then we also run these canary tests. Every five minutes in production, a full cycle will get executed. In the case of a cast feature set, it would be a Kubernetes cluster gets created on Amazon. installed, statistics are gathered, onboarding is created, and then optimization occurs, and then we shut it all down. We do it again a few minutes later. The strict discipline in operational focus is extremely important, and that's what led to these engineering practices. And then for operations to be effective, you need tooling. So you need the basic things like PagerDuty, or we use OpsGenie, but you also need a very strong observability pipeline. So we use tools like Loki and Grafana tools as well. So we have a set of kind of cloud native observability tools we use. All of that makes it easy for engineers to troubleshoot issues because all of the tooling is readily available at their fingertips.

Noah Labhart

So from that point with your product, how did you progress it? How did you mature it? And, you know, I'm looking to understand how you built your roadmap and how you you decided, okay, this is the next most important thing to build in the product.

Leon Kuperman

One principle that you should know before I start, if you ask customers what they want, they will ask you for a better mousetrap. In other words, they only know what they know. They don't know what that leap is yet until they have it in their hands. We didn't start the product management process by going and interviewing a bunch of customers and saying, saying, okay, we think that cost is a problem. Tell us about all of the pain points you have in your existing cost tooling. There needed to be some kind of radical shift in thinking that would create a 10x benefit. And that takes a leap of faith that takes sometimes months to validate. Months. Because until you get to some MVP that has some 10x capability, everyone's going to tell you you're crazy. You're not on the right path until you actually prove out that value. Not building a better mousetrap was kind of the first underlying core principle. And we started the product management exercise with a very high level vision document. So rather than just starting to code, because that's expensive, we sat down and said, OK, in the fullness of time, what do we want the user journey to look like? So there's a great book. It's called Working Backwards. I forget the authors, but they're people who came from Amazon. And they really described the Amazonian process. And one of the things I will say about the Amazon team is they're fantastic writers. And so they work on this principle of we should be able to write a press release for the feature or the product that we're going to release and express the value of that product in basically a press release plus a frequently asked questions section. Forget about budgets. Forget about a number of engineers. engineers, this is the thing, the killer thing that we want to build. And in some detail, we describe the user journey and the experience. And then that is what we start breaking apart and saying, okay, we clearly can't do all of this. We cannot boil the ocean. We can't build this vision from day one. So what's the smallest part of this vision that we can extract out of that document to create value for our customer? And in the case of Cast, it was our autoscaler. So So we extracted out the auto-scaling feature and we said, look, if we could build an auto-scaler that actually took costs into account, that would be a first step to optimizing a customer's Kubernetes environment. And that's what we built and delivered to the market early on. But then you need to iterate. And this is where customer feedback starts. Once we have that minimal feature that we can actually take to a customer, we will go and pull from an audience of industry folks. Sometimes they're engineers, sometimes they're executives in technology, depending on where the feature set is targeted. Like, for example, for an autoscaler component, I really need a DevOps-focused engineer to test that piece out. But for a cost reporting module, something where I'm projecting forward cloud costs, I really need an executive that's thinking about financial controls or the CTO who is on the hook for the budget. So we do these user groups and our user experience team really try not to influence the engagement. We basically watch how that user interacts with the components of our product. product, we try not to lead the witness, so to speak. And then we gather data back and then everyone reviews that, including the engineers and the product management team. We actually spend a lot of time looking at the outcomes and there are kind of two immediate outcomes for those user sessions. The first outcome is, are we directionally in the right place? Because if we're rough directionally, if we're having a lot of friction and resistance, then we have to do something. might cause a pivot which it did in the case of cast which i can explain if that's interesting and then the sec and then the second um piece of feedback that we're getting is what are the things that we found intuitive but the user is absolutely finding confusing and those are easy usability fixes it's often just front end sometimes you don't even need a back-end feature to fix those usability glitches. So that process led to the pivot and I think I should maybe we should take a minute to describe that pivot. So when we started this vision like if you go back and you read that early document it said we believe the future of cloud computing is using multiple cloud vendors simultaneously to deliver an application so multi cloud kubernetes was our big vision and What we realized very early on is, and we talked to some very large customers, and the customer said, look, Leon, I love the components of your product that are helping me manage costs and reallocate resources. I don't need multi-cloud high availability. We're just starting our cloud journey and our Kubernetes journey. You're already talking about the next 10 years of evolution. I'm not there yet. And we found that most customers were not there yet for high availability use cases. Some were, but most were. And frankly, you're a startup. I don't trust you to run my Kubernetes control plane. I've already got an engagement with Amazon EKS or GKE in the case of Google or AKS in the case of Azure. Sure. So why don't you meet me there? Why don't you do all the magic that you want to do, but just do it inside of EKS? And then there's that first initial resistance. Well, we can't because of these technical limitations. But then your engineers are smart folks. They figure it out. We say, all right, how can we get this done in an environment that we don't fully control? And sure enough, the engineering solutions arise. rise. And that's how we led to our kind of first and probably the big pivot for the company was we said, all right, we're going to meet customers where they run Kubernetes. And we're going to start with Amazon because that's the largest cloud computing market. And we built our first EKS integration for all of our components. And we released it in the KubeCon Europe, Europe, which was in May of this year. And now in this KubeCon that's coming up, we have a bunch of really exciting announcements, including customers and product features that we're super stoked about. One of the interesting light bulbs that went off when we started kind of presenting the EKS product, so the Amazon Elastic Kubernetes Service product was, so how do we get folks onboarded and working with our product with almost no human interaction or zero human interaction and this is where kind of the savings estimator hook idea really crystallized so we created this one-line script that you can run that creates a read-only agent in your kubernetes environment and then reports back to you within a few seconds hey this is all of the waste that you have in your cluster and this is what we would do differently this is how we we would configure your infrastructure pool differently if we were running this automatically. And that hook was the eureka moment. And I highly recommend for anyone that's building a SaaS tool, you've got to have that early engagement that gives customers or prospects the sense of value super early. They can then dive into the detailed features. Okay, I get it. I'm going to save 50% on my cluster. I'm excited. How do I get started? to start the more complex set of interactions. But the first initial hook can't take very long and it has to provide immediate value to the consumer.

Noah Labhart

Well, let's switch to team then. So how did you go about building your team? And you mentioned that there's not been a product team, a QA team, it's primarily engineers. 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?

Leon Kuperman

You know, you make so many mistakes in hiring. And I think the general rule is as entrepreneurs, as executives, we'll still continue to make hiring mistakes throughout the rest of our career. That's just a fact of where we are. But by this point, kind of 25 years later, I have an idea of the personality prototype. So we started with a very interesting premise. I said, OK, we can't afford to build this company in the United States. The salaries are too high. We didn't have endless budgets. So where are we going to build that team such that we can afford to at least get off the ground and then expand as we raise more capital? capital, we chose a country called Lithuania, which is a very unusual choice. I know that folks have engineering teams in India and China and Romania and Poland and many other different parts of the world. I think Italy is becoming an interesting hotspot, as well as many areas of the United States. But the truth is here in the US and Canada, we have a severe shortage of engineering talent. It's very hard to find those people and to keep them incentivized, especially when companies like Google and Microsoft and Amazon that you can work for as a top engineer. So we kind of had to compensate for that and we went outside of the country to do that. Once we kind of decided on our location, we made a very interesting technological choice. So Kubernetes is cloud native written in Golang. So we said, okay, we want to have engineers that are excited about Go. Maybe they haven't previously learned it, but they would have to be able to step up and learn very quickly. And it's not an object-oriented methodology. It's very different than scripting languages. That immediately kind of weeded out a whole section of folks that weren't interested in kind of going hardcore Go development. And it served two purposes. It kind of filtered out our potential pool of hires, but it also i know from previous experience that engineers working in go are very happy engineers so so because it's just a simpler more straightforward environment and there's a lot less crud and boilerplate so we kind of kill two birds with one stone in that decision and then the rest is we need the last ingredient to kind of an engineering personality is we need to have folks with an entrepreneurial spark in them. So I wasn't just interested in that engineer, maybe that's a few years out of school. I was interested in that engineer that wanted to take the red pill, if I want to use the matrix analogy for a second. I encourage people to have a vision, to want to start their own business, to want to start their own company in the future. and they may say well Leon I don't have all the skills that I need to do that and I'm great that's what I'm here for I'm here to show you the best path that I've learned learn from my mistakes learn from from our collective experience as founders and then eventually you will have what it takes to go off and create your own thing of beauty and so that's the mindset that I'm looking So it was a combination of kind of location for budget purposes and for competitiveness. It was a combination of technological choices that we made very early on in terms of the low level core skill sets. And then the third component was really the drive and personality to say, hey, I want to eventually be able to do this on my own.

Noah Labhart

the nature of your product is going to make this next question super interesting and i kind of know where you're going to go but i'm going to ask it as generically as possible did you build this to scale efficiently from day one or are you fighting this as you grow

Leon Kuperman

yeah i was super paranoid about building this to scale efficiently having said that we're entering a phase where where we're starting to do a lot of data analysis and the quantity of data. So like we take a snapshot per cluster every 15 seconds and that turns into a fully formed JSON blob that's a few megabytes in size. So now you multiply that by the number of customers, the number of clusters every 15 seconds, that starts to get to be a lot of data. So we did have some interesting scale problems like, oh, our object storage costs are going through the roof. database costs are increasing on a daily basis. What are we doing here? I would say, yes, we're gonna have some kind of microservice scale issues, but I think by the nature of the early decisions we made and just the nature of Go's parallelism model, we're in pretty good shape. I think, and I was just talking to my engineering manager, like I think we've made some pretty good choices early on to help us facilitate. And the team has the right mindset set, because remember, they're going through all of the phases. They're not just designing and throwing over the fence. They're delivering it and supporting it in production. I think we're going to have other interesting scale challenges. Like one of our core tenets is to make a scaling decision every 15 seconds. Well, if we're going to keep that core tenet, we're going to need to have an interesting strategy for storage, storage costs, processing that data at scale and so forth.

Noah Labhart

I love it that you were paranoid, this is the word you used, about scale in the beginning, but you're approaching scale and having to think about scale, even in such a product that is built around scalability or scalable enterprise type systems. So I think it's awesome and fascinating.

Leon Kuperman

And by the way, we had some interesting kind of scale issues in early days. I'll give you one example. So our autoscaler goes through all possible permutations of pod placements to potential nodes that we could order in the open market. If there's something like in the order of 10 or 15 pods to place in an open configuration on AWS, it's something like 10 to the 16th power possible permutations of computers that we could order to fulfill the capacity requirement. climate. Obviously, we can't go through every single permutation. So this is where some of the advanced data science and advanced algorithms come in, where we need to be able to very quickly predict and estimate the recommended configuration. And that turns out to be a pretty hard math problem. So there are interesting problems in scale that aren't necessarily just the typical problems, like, for example, you know, oh, it's Black Friday in a few weeks. How do we scale our shopping services to meet the demand of a million customers? Yeah, that's an interesting problem. Our problems are a little bit more nuanced at scale. How do we solve for a permutation problem of 10 to the 16th possible combinations?

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?

Leon Kuperman

I'm most proud of the foundational team that we have. And I'm confident that they can build anything that comes at us. Like we could get the largest customer tomorrow. And as they increase in size, we would be able to tackle it both from an operational and maturity perspective, as well as we'll be able to deliver the features that customers really need as a Delta from what we have today. So like the foundation of growth and scale is there. And that's the thing that I'm most proud of. Do we have an absolutely perfect finished product? I don't think anybody does. But we have a path to get there and to continue to evolve. And the team is really the underpinning of that ability.

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.

Leon Kuperman

let's talk about a run of a mill mistake and then i'll kind of give you a more epic mistake right so problems happen all the time right it's unrealistic to put up a gate that says we will never release a bug to production right we had one today we uncovered an old bug because of a brand new feature that we're delivering it manifested in production i'm okay with those mistakes if a couple of things are in place. One, the customer didn't tell us, we told the customer. That's really important. I don't want a customer saying, hey Leon, your stuff is down and you don't know. That's a huge problem for me. If we can go back and tell the customer, Mr. Customer, we have an API outage for five minutes from this time to this time, here's what the effect was, I'm okay with that. And the second thing is the ability to roll back. We have a rule that we have to be able to roll back any change within 30 minutes. A rollback procedure has to be available for every change that goes to production. And in this particular case, it was like 26 minutes from the time we deployed a change till the time we had an impact to the service, till the time when we're able to roll back. And under those two conditions, I'm okay with mistakes creeping into production, production, because if you're so paranoid about making a production error that you never release any code, it's a paradox. You actually make the problem a lot worse. A lot of people say, well, Leon, isn't it risky that you release 15 times a day to production? No, it's the opposite of risky because the change that's getting to production is so small and the rollback is so easy that the likely impact is exponentially diminished versus a team that will bunch up a bunch of changes and maybe release at the end of the week. lot pretty nervous about the 30 Jira tickets that make it into that batch. So I think from that perspective, the small mistakes, we make them all of the time, but we have good coping mechanisms and those two underpinning values are really important. The epic mistake, I think it's both a mistake and the reason for our pivot. Believing that the world was ready for multi-cloud way way before it was, is probably one of the big assumptions that we made and led to us building features that we could have spent our time building other things that would have added more customer value earlier on. In hindsight, probably a lot more customer research would have uncovered the product management direction more readily before we started writing a ton of of platform features.

Noah Labhart

It's interesting about mistakes. And this is why I asked this question is that the learning from it is, is shaping for your team, your company, your product. And it really sets the tone for what is done next.

Leon Kuperman

If mistakes are not egregious and like not deliberate and there's a learning framework in place and we keep the analysis process blameless, your team can only improve as a result of that. it.

Noah Labhart

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

Leon Kuperman

So we have to, we kind of have a horizontal scale out of our product, meaning we have to support a bunch of more Kubernetes environments. So at KubeCon this year, we're going to be introducing Azure Kubernetes service, AKS, but we also have a bunch more to do. So like we have Rancher is a a big request. We have OpenShift because OpenShift customers pay twice. They pay for the infrastructure and then they pay for the OpenShift license. There's a lot of platforms that we have to enable as kind of one dimension of growth. But the other thing is we've been heavily focusing on cost and cost reporting. And we have two teams that are creating all of those features. But the platform itself is expanding in scope. So once you're onboarded to CAST, I hope in the future we will be able to help you with security assessment and storage assessment and basically help you manage your resources not just from a cost perspective but help you with compliance and security and storage and disaster recovery. So the plan to implement those capabilities again using kind of that fully autonomous principle is to create new sets of service team for every and have those teams kind of run as independent businesses almost within the platform.

Noah Labhart

Let's switch to you, Leon. Who influences the way that you work? A CTO, an architect, a CEO, really any person. Name a person you look up to and why.

Leon Kuperman

So I look up to my dad. That was kind of a key, kind of two big role models in my life. But I look up to my dad because he built a business in North America and Canada specifically, like really starting from zero, coming to a place with all of the odds against them, language, education, culture, capital. He had none of those things. And he was able to scrap his way into with my brother. they built an extremely successful manufacturing business. Up until last year, he was still working at 83. So the work ethic and the tenacity to achieve against all odds is something that I'll forever be thankful for him instilling in that me and that I still greatly admire to this day. And that goes for my mom and my dad because they were really business partners in the venture together. And then from an entrepreneurship technology perspective, I like to consume a lot of information about kind of thought leaders in our space. But Peter Thiel is probably the most interesting entrepreneur that I've been kind of like studying in the last decade. Elon Musk is someone who is really inspiring in that unlike the conventional wisdom that says, hey, you must focus on one thing and do it really well. Focus is the path to kind of success. Elon is able to have brilliant ideas in multiple areas by just using first principle thinking and then also surrounding himself with great people for each one of those pools of ideas. So he's momentum. But then by just asking first principles questions, like the Tesla battery is a great example of why can't we make this battery cheaper? The industry has a whole lot of answers. But then if you just keep asking why, eventually you get to, well, it's always been done this way and it can be changed. So those are kind of the two extremes of my role model influences in life.

Noah Labhart

Well, we talked about a mistake, but a little bit different spin. If you could go back to the the beginning, what would you do differently? Or where would you consider taking a different approach?

Leon Kuperman

You know, all of those, I think this is what we talked about early on. When I look back at the first company we founded and all the mistakes we've made, I'm like, I kind of close my eyes, cover my eyes with my hands. Like, how did anyone ever invest money in that 22 year old? but I wouldn't have done even though there were some extremely difficult times and things were really bleak they all built on one another so even though like oh maybe I shouldn't have joined that company because I was miserable for a year if I hadn't done that I wouldn't have experienced that DDoS attack that I just as an example and as a result I would have never become interested in the lack of cyber security capabilities we have in the world So then that would have not lent me to the next startup. I think that all of these things happen for a reason. And even though some of these things are super painful in the moment and you're like, why would I ever want to live through this? Those pains are almost necessary to shape your view of how the world should look like. I wouldn't change anything, even though a lot of those things were super painful and not pleasant in the moment.

Noah Labhart

Well, last question, Leon. 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. Can't wait to show it off to you right there on the plane. What advice do you give this person having gone down this road a bit?

Leon Kuperman

You know, when I first started in entrepreneurship and in startup life, you could have a great idea. You could execute and build a great product only to find yourself with very little of your company left at the end of that flow because of dilution. right like you take on money and you're burning fast because your investors are asking you to grow quickly and then you have to take more money on and dilute yourself again and then at the end of that whole process you've put you know like what seems like your life's work into a project and you're super proud of it and you actually may not end up with the control or the financial component at the end of that journey. So the advice that I would give folks is be super frugal at the beginning. Don't take money if you don't have to. That means there's a bit of a sacrifice in the short term. So the great thing is like 20 years ago, you have to build data centers and invest in infrastructure and do all of these things that are just tangential to your actual product idea for software as a service, for example. These days with the fungible resources we have available to us, you can actually spend very little and get to an MVP. Even if that MVP doesn't scale, even especially if this is your first rodeo, you can fix all of that, but get to something that has customer value with the least amount of dilution to yourself possible. And then when you're ready to scale and you have what's called product market fit then you can take a whole bunch of money on and then you can grow quickly but you can do it in a controlled way where dilution doesn't put you in a spot at the end of the journey where you you don't have as much of the company or as much control of the company as you probably would have dreamed of at the beginning so that's kind of the the the one piece of advice and in this day and age especially especially with software as a service companies, there are so many creative financing options that you don't have to go the traditional VC route of seed and series A and series B and get diluted four or five times. For example, you can do things like accounts receivable financing. So if you have an ARR annual recurring revenue book of business, you can actually go and get debt financing against that book of business before having to take on more equity dilution. That would be the thing that I tell folks early on is start frugal and don't dilute yourself until you really have to.

Noah Labhart

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

Leon Kuperman

Thank you. No, it was great talking to you. Thanks for the deep questions.

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.