So, scalability was one of the number one priorities from the beginning. Building an API-first product that sits at basically core critical parts of a product, we wanted to make sure it scaled. One of our customers threw something like 3 million requests in a day through the system. And it's something that, you know, prior to that they were doing like 30,000 requests a day. So they went on this huge jump from numerous days. And we only noticed because we were checking analytics every day of like usage and things. The system just stayed solid the entire time. My name is James Perkins. I'm the co-founder and CEO of Unkey.
This is Code Story. A podcast bringing you interviews with tech visionaries.
Six months moonlighting. There's nothing on the back end.
Who share what it takes to change an industry.
I don't exactly know what to do next. It took many goes to get right.
Who built the teams that have their back.
The company is its people. The teams help each other achieve. Most proud of our team.
Keeping scalability top of mind.
All that infrastructure was a pain. Yes, we've been fighting it as a group. Total waste of time.
The stories you don't read in the headlines.
It's not an easy thing to achieve, my dear. Took out the shelf and dusted it off and tried to begin.
to ride the ups and downs of the startup life.
You need to really want it. It's not just about technology.
All this and more on Code Story. I'm your host, Noah Labhart. And today, how James Perkins built seriously fast authentication so you can scale your user-facing API. API. James Perkins did not have a traditional journey to technology, but has been in the space for 16 years. He had planned to be a special education teacher prior to switching to technology. He's worked in pre-seed startups all the way to big corporations. But outside of tech, he has a wide variety of hobbies, in particular, running and training for half marathons. This process requires about six weeks of training, primarily mental training over physical. James and his co-founder were friends and colleagues before their current venture. They had an idea around building a small version of API authentication. After building and releasing this version, they wanted to see how people received it. They were overwhelmed with the response and figured they should push harder on this to be a company. This is the creation story. of Unkey.
Unkey as a company is an API management platform. We started in a very different direction than your traditional API management platform. So if you look at say Kong or Tyk or Zuplo or any of those kinds of platforms, a lot of those offer a gateway and that's how you enter into the API management platform. You get a gateway and then maybe you have some extra features features such as API keys or rate limiting or things like that. What we did at Unkey was look at where developers are in the space versus where say DevOps or any of those kinds of people are. We started with API keys and provided a way for you to create, manage, delete, revoke, all those things that you need to do with an API key. It could just be a solo developer, it could be a very small scrappy startup and essentially give you the ability to make a user API without having to worry about all of the intricacies of a gateway. We made it as simple as possible so that anyone could pick it up whether you've done APIs before, it's your first API, we were just exploring the space. We want to meet developers at the core problem without them having to learn a whole new piece of the tech industry. Unkey was born through myself and my co-founder. We'd done some work before and some co-marketing because we worked, I worked at Clerk, he worked at Upstash, and he had this idea to build essentially a very small version of Unkey as a marketing, joint marketing effort between Clerk and Upstash. And when he pitched it to me, I sat there and thought, this is actually much bigger problem than most people realize. So maybe we could actually do this and make it into a product. We both were open source builders, so we just thought, maybe this could be a side project. Let's just put it out there and see how the world receives it, and then if they receive it, maybe it is actually a business. The first commit was June 9th, and we launched our MVP on June 21st of 2023, and we launched it and it was received really well to the point where we were overwhelmed with the amount of reception that we had. And then that's when we knew that this was a problem that other developers had and that we should probably push harder into the space.
So let's dive into the MVP process. Tell me how long it took and sort of maybe the high level around how it was built. But give me the story there around how you went about it, how you went about building it, to bring it to life and all the things.
So when we built the MVP, we were fortunate enough that both of us had been in the space. We went to what we all knew in the beginning. It was a Next.js application. We used Clerk for auth and we used Upstash as well as TinyBird for analytical data and then PlanetScale for our database. And then our API was built originally in TypeScript. it. And the advantages we had there was those are all tech that both of us were incredibly familiar with. And that allowed us to move incredibly quickly. We didn't make scalable decisions in the beginning. We tried to make sure that we knew that this would scale to a level of if we get a million requests tomorrow, are we going to be okay? So we did a lot of work around that. But we didn't think about what happens if 10,000 users sign up tomorrow? Is the Next.js app going to be okay? Is the analytical data going to be okay? Do we even need pricing? We didn't have pricing in the beginning of our MVP. We were just hosting the services and we were paying the fees. We made that decision based around if we can build this and it actually has some legs, then we can invest in making this easier for us to maintain and make it scalable to a level of if we hire five people, do we need to worry about any of this? We had a lot of components that we'd already built for other projects. So Andreas, my co-founder, had done a couple of other projects that were open source and fairly popular. So we grabbed a lot of, the web app was built very much around that. And me being at Clerk, that meant I could implement things like middleware and protection and all those kinds of things. The biggest part for us was just the API because we're an API service, essentially. We had to build that from scratch from the beginning. The MVP was very much built upon, to do a lot of these things. We can deploy it to Fly and make sure that it has a lot of regions so it can be globally distributed. We can do some caching in memory, all those kinds of things, which is not what we do today. But it allowed us to move so quickly that, yeah, we started June 9th. By June 21st, we had launched our product. We added pricing in July and had our first customer in July who was willing to pay us. We tried to make sure that we were conscious of the scalability, which some people don't do in the beginning. But we certainly had some struggles as we grew the product and realized that we'd made some mistakes as we'd gone along. And we've rectified those, made it easier to maintain and scale as time goes on.
So you've got the MVP. It's working. Tell me about how you went about building your roadmap. How did you mature it and progress the product? And I'm curious about what you did to decide to decide, okay, this is the next most important thing to build or to address with Unkey.
Being in the API space, we just went and looked at, one, our competitors and what features did they have that seem useful to everybody. And then we looked in the auth space as well, and look what they were offering to extend user management. The way that we decided on the roadmap map was looking at what was hot in the space and then also how we could fit that into Unkey. So I can give a pretty good example. In the beginning, we had rate limiting and keys that expired. So you could set a day on a key and it would expire after a week, a month, a year, whatever you wanted to set this key to so that you could issue those keys out and they could expire. So if you needed someone to audit your API, you could give them a key and you don't have to worry, oh, I forgot to to revoke this and they still have access, all that kind of is handled through us. What we realized quickly was that AI was getting bigger and bigger. So in June, July, August sort of timeframe, AI was really taking off. People were building more and more products on any kind of AI that was out there, whether it was image generation, or it was something to do with text, or it was taking voice and turning it into text. They were doing all these kinds of things. they were building token-based requests. You pay me $10 and then you get 10 generations or 100 generations, whatever the number may be. And so we introduced something called limited use keys, which essentially allowed you to set a limit to a key. So it could be used 10 times, 20 times, 100 times. And we pushed that into the AI space and said, hey, if you want token-based usage, don't build that yourself. Just come and use one of our API keys. you have the ability to do that and you can do it for every customer and it doesn't matter if they spend $100, $20 or a million dollars, you can set that number to whatever you need it to be and we will handle the rest for you. You don't have to worry about that user accidentally figuring out how to get more access without paying you. Our key will just stop working once it hits that limit. Obviously, as time has gone on and now we're like a fully fledged company and we have funding, that roadmap has changed. The direction that we're moving in has changed. And those changes take time and we drive to this overall vision versus the small wins that we know would get us more customers or more users.
You know, I hear you saying we, and I'm curious about how you went about building your team. And what do you look for in those people to indicate that they're the winning horses to join you?
To give context, our team is just four people. We took a very different approach that I think most startups would take, which was our first hire was a junior engineer with zero production experience. I know the person personally through just life in general, and I knew that about his work ethic and the way that he takes on a role, whether it would be whatever he was doing at the time. He was a person that was all in from day one and would do everything in his power to make sure whatever we ask of him, he would deliver. So we took a big risk on hiring a junior as your first eng when you really need to be moving as quickly as possible. And it's paid dividends for us. So him being a junior did a lot of eye opening for us. We realized that we were missing a lot of key core elements to building an actual company. We were missing things like how does any of this work? None of that was documented. It was just all in our brains. how that works, in the code base, how the code base works itself, which lends to the open source nature of the product. To being open source, you need those so that if someone wants to contribute, they can do the same thing. And then secondly, our other hire had been in the industry for a few years, but we took the risk because he was a sales engineer, lesser developer, and we decided that his passion just in general would pay dividends. We didn't care so much about these are going to be the most top performers in the universe and we need to pay them this giant salary to make our products. We actually went the opposite way which was we would pay a reasonable market rate for these guys knowing that they would push the product harder and harder and Dom our second can hire was very much that he came to the interview process asking questions about Unkey that you wouldn't normally see in a sort of an interview. We knew about his work, we knew about what he was doing, but we didn't expect someone to come in with half a dozen questions about what's the future look like? What do you expect from a team member? Where do you expect Unkey to be in five years? What's the runway on the amount of money that you have today? If I was hired, How could I help bring the product to the next level? All those things that really made him stand out from everybody else that we'd even consider that point. And both of those hires have been incredible, which is pretty out of the norm for a normal staff. Normally, you try and hire some really excellent folks and allow them to drive the product forward. And we went a different direction of hiring people that may have been underdogs, which, you know, Andreas and I are very much underdogs as well. and we've really just got all in the same boat and we're all rowing the same way.
Okay, this will be interesting. Given what you've built, I'm curious about scalability and where it came in. Was it built to scale efficiently from day one or with scale in mind or is there anywhere where you're having to fight it as you grow?
So scalability was one of the number one priorities from the beginning. building an API first product that sits at basically core critical parts of a product. We wanted to make sure it scaled. So even when we were very young in November of last year, one of our customers threw something like 3 million requests in a day through the system. And it's something that, you know, prior to that, they were doing like 30,000 requests a day. So they went on this huge jump from numerous days. And we only noticed because we were checking analytics every day of like usage and things. The system just stayed solid the entire time. And then as we've matured the product out, scalability has been less of an issue. We haven't really had to worry about what happens if 100 million requests come through. We've done some pretty hefty sort of load testing on the system just to see. And we've never really had any sort of issues. And that's allowed the product to be one, easily maintainable. It's easy for us to slot a new feature in and not have to worry about the core system having any issues. And I'm forever thankful that Andreas spent the majority of his time worried about scalability and less about getting the product out in the first place or releasing new features or whatever. He's always been very conscious about making sure that our product will scale to essentially infinity without us having to worry too much.
Well, James, as you step out on the balcony and you look across all that you've built, what are you most proud of the
developer experience that we've built is truly unmatched, and hearing that from customers is just one of those things that, like, warms the heart. Almost being able to give someone the tools to build this public API and spend what would take potentially weeks to build themselves, to take them less than an hour to make their API public and feel that it's going to be secure and scalable is something that I'm super proud of. And then as a company, I'm just proud of the fact that we're here and we have a startup. It was definitely not something that was on my sort of end of 2023 bingo card, that's for sure. And I'm proud of what Andreas and I have done and the team that we've built so far. And I'm looking forward to making that bigger and better as time
Tom, let's flip the script a little bit. Tell me about a mistake you made and how you and your team responded to it.
I think the only time that we've really had this problem really was when we were scaling some of our product out. We had made some changes to the database itself. If you're using the web app and you wanted to create keys in the web app, that no longer worked. and we hadn't realized at the time that this had been affected. The team were incredibly responsive to the fact that it had broken. So it broken pretty late in the night for Andreas, and even for me, to be fair. It was like 9 or 10 p.m. Eastern time, so that's two, three o'clock in the morning his time. Sent out the bat signal, said, hey, by the way, like, our entire UI doesn't work right now. Here's what what's happening, here's the errors, here's where we're at. Like, I'm debugging, but also where this problem lies. And Andreas got himself out of bed essentially and was like, oh yeah, this was something that I did. Let me just push a fix out, get that working again. And then let's let the customers know the reason that this happened. And it's a small mistake that could have cost us customers potentially. Seeing errors that were not handled correctly and showing like database errors right in the application is definitely not graceful. But the team just responding around that and letting the team know happen probably again at some point, we're going to put a release out and something's going to break and it's okay to do that. We're moving quickly, we're moving fast, but the amount of time it takes us to respond and actually talking to the customers about why this is happening allows us to take that mistake as a learning and make sure that those same mistakes don't happen again. It might be something else, but making sure that exact mistake doesn't happen a second time.
Okay, this will be fun, James. What does the future look like for Unkey, the product, and for your team?
We want to meet developers at their level. I don't want to be telling you, okay, now you have to figure out how YAML works and how Docker files work and how configuration files work. So the future of Unkey is very simple in nature. We are bringing out a gateway, Gateway is going to be different than anything you've ever seen in the market. What we want to bring is a one to two click gateway that will allow you to protect an entire API or an entire web app, depending on what you want to do with it. And we want to make it scalable. So if you're only doing a few hundred thousand requests, that's fine. And we want to make sure that it's globally distributed so that your customers, no matter where they are today, they don't have to worry about why is the response so slow from your API. On top of that, we want to bring things like SDK generation, documentation generation, all those things that you need to build a comprehensive API from end to end. We want to be able to give you all the tools to do that as a developer and not have to hire an entire team to first build that infrastructure and then a secondary team to then implement that infrastructure. structure. We want to make sure developers, no matter how new you are to the field, you could go to Unkey today or six months from now or a year from now and find everything that you need in a one-stop shop where you feel comfortable and you spend less time worrying about these features that are required for security or maintainability or scalability and worry more about that core product.
Okay, James, let's switch to you. Who influences the way that you work? Many persons are something you look up to and why. One
of them is definitely my dad. He has spent the last 30 plus years in the pharmaceutical industry, working on all sorts of medicines and vaccines and all sorts of things like that. And every day he shows up and he works himself tirelessly, even in COVID where he basically worked every day of the week during COVID to get vaccines so that people in the world could choose whether or not they want a vaccine or not, that that was an option for them. And then secondly, my CTO, I'm definitely influenced by his hard work and his ethics. And then there's some other people out there. My girlfriend Meg, she's an engineering manager. I see her trying to keep all of the engineering department working in a specific way. Those kinds of people just influence me with the work ethic and maybe not coming from a traditional background that you see when you think about tech or you think about just any of these like high paying jobs or high stress jobs. I certainly fell into the CEO role. I fell into tech. Andreas was semi-traditional, but these people that go out and show every day are the people that really influenced me.
Okay. So we talked about a mistake earlier, but this is a little different spin. If you could go back to the beginning, what would taking a different approach. It doesn't have to be something that didn't work. It could have even worked well, but maybe you tweak it a little bit.
One of the biggest things is the API itself. The API has been through a few iterations since we began, and also it has gone through language changes. So in the beginning, if you remember in the MVP, we were TypeScript. Then we moved from TypeScript to Go because we felt like that's the best way API for us. And then we actually ended up coming back to TypeScript when we decided that we actually wanted to move off of Fly where our server was deployed for our API. And we came back to TypeScript again. TypeScript's definitely what we really wanted, but we couldn't make it work in the beginning. So we rewrote a lot of code. And during that time, we were lucky that we had a small amount of customers because we had to essentially all of the keys that were produced in the original MVP, we actually had to tell people to, you need to go and recreate all of these keys on the switch from TypeScript to Go, which was a very hard email to write. One, because we were just like two guys and we had no funding. We had no nothing. We were just two guys. And then secondly, getting those requests in of, is this ever going to happen again? Like, how can we trust the platform if this is the case? And having to explain ourselves and being like, the reason that we did this was because of a tech decision we made in the original MVP that we want to move away from. And even if we ever make any changes to this core product, this won't happen again. And we proved that when we went back to TypeScript and used Cloudflare Worker, we didn't have to make everybody reissue a bunch of keys or anything like that. We just made the switch seamlessly.
Last question, James. James. 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 and 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?
First, show it to everybody. Show it to people on planes. Show it to your friends. Show it to your family. Show it to anybody that would want to listen. I think the key thing for us in getting to where we are today was less about the product in the the beginning and more about yelling from the rooftops that we've brought this product out. I believe that there's two ways a product dies in the world. One is that you don't market it, and two that you have terrible support. So in the beginning, you only have to worry about one of those, which is making sure you can market to anybody. So if you've already got the MVP or you're halfway there, now's the time to start talking about it. Talk about it with your friends, if they're in the same space as you. And overall, just have fun. I think people get way too serious when they're worried about, oh, I need to get funding for my product. Have fun. If you don't enjoy what you do every day, if you get $10 million, you're not going to be fulfilled every day if the product that you're building is not actually what you wanted to build in the first place. And I think that is a big thing. So yell it from the rooftops and make sure that what you're building is actually something you could see yourself building to 20 years are two really key pieces that I would give as advice.
Couldn't agree more. Well, James, thank you for being on the show today. Thank you for telling the creation story of Unkey.
Absolutely. Yeah, really had a good time. Thank you so 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, choice. And when you get a chance, leave us a review. Both things help us out tremendously. And thanks again for listening.