# S9 E16: Bypassing Kong and Azure APM: Implementing Global Edge Rate Limiting and Decentralized API Key Governance with James Perkins, Co-founder & CEO of Unkey

Published: 2024-03-19
Duration: 1511s
Audio: https://pdst.fm/e/pscrb.fm/rss/p/audio4.redcircle.com/episodes/8be492d1-1e7b-480c-bef2-6ad3bc4fac82/stream.mp3

## Key Takeaways
- Keys Before Gateways: Unlike platforms that lead with a gateway, Unkey started with creating, managing and revoking API keys, so solo developers and small startups could offer a user-facing API without learning gateway intricacies.
- MVP in Under Two Weeks: First commit was June 9 and launch was June 21, 2023, using familiar tools: Next.js, Clerk, Upstash, Tinybird, PlanetScale and a TypeScript API. Pricing and the first paying customer followed in July.
- Limited-Use Keys for AI: As developers built token-based AI products, Unkey added keys capped at a set number of uses. The key stops working at the limit, so teams don't have to build usage enforcement themselves.
- Rewrites Have Customer Costs: The API moved from TypeScript to Go, forcing early users to recreate their keys. A later return to TypeScript on Cloudflare Workers was seamless, with no mass reissue.
- Betting on Underdog Hires: Unkey's first hire was a junior engineer with no production experience, chosen for work ethic. He exposed how much knowledge was undocumented and lived only in the founders' heads.

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 6 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](https://unkey.dev/).

Sponsors

- [Porkbun: Use the link codestory.co/porkbun and get a .dev, .app, or .foo domain name for only $5!](http://codestory.co/porkbun)
- [CacheFly](https://cachefly.com/codestory)
- [ClearQuery](https://clearquery.io/codestory)
- [Kiteworks](https://www.kiteworks.com/platform/simple/managed-file-transfer/)

Links

- [https://unkey.dev/](https://unkey.dev/)
- [https://www.linkedin.com/in/james-perkins-268992a4/](https://www.linkedin.com/in/james-perkins-268992a4/)

 

  

Timestamps

00:00 – Intro

05:09 – Building the Unkey MVP

07:58 – Maturing the Unkey Roadmap

10:41 – Building the Unkey Team

13:37 – Scaling From Day One

15:21 – Proudest Moment

16:16 – A Mistake and Response

18:10 – The Future of Unkey

19:49 – Influences on James

21:10 – Doing Things Differently

23:03 – Advice for Young Entrepreneurs

Times are from the episode recording; ad breaks in your player may shift them a bit later.

  

Read the key answers from this episode, with quotes and timestamps from James Perkins from Unkey: [https://www.codestory.co/episodes/s9-e16-bypassing-kong-and-azure-apm-implementing-global-edge-rate-limiting-and-decentralized-api-key-governance-with-james-perkins-co-founder-ceo-of-unkey/](https://www.codestory.co/episodes/s9-e16-bypassing-kong-and-azure-apm-implementing-global-edge-rate-limiting-and-decentralized-api-key-governance-with-james-perkins-co-founder-ceo-of-unkey/)

  
  

Current Sponsors:

- [Tiger Data](https://tigerdata.com/)

- [Protected Harbor](http://protectedharbor.com/codestory)

- [Render](https://render.com/)

- [Fitnexa](https://www.fitnexa.com/)

- [Perplexity](https://pplx.ai/codestory)

- [Entelligence](https://entelligence.ai/)

Checkout our Stacklist! [https://stacks.codestory.co/](https://stacks.codestory.co/)

Check out our [Patreon!](https://www.patreon.com/cw/codestory)

Hosted by  [Noah Labhart | Technical Founder & Startup Mentor.](https://noahlabhart.com/)

  
  
Our Sponsors:  
* Check out Granola and use my code granola.ai/CODESTORY for a great deal: https://granola.ai  
  
  
Advertising Inquiries: [https://redcircle.com/brands](https://redcircle.com/brands)  
  
Privacy & Opt-Out: [https://redcircle.com/privacy](https://redcircle.com/privacy)

## Chapters
- 0:00 — Intro
- 5:09 — Building the Unkey MVP
- 7:58 — Maturing the Unkey Roadmap
- 10:41 — Building the Unkey Team
- 13:37 — Scaling From Day One
- 15:21 — Proudest Moment
- 16:16 — A Mistake and Response
- 18:10 — The Future of Unkey
- 19:49 — Influences on James
- 21:10 — Doing Things Differently
- 23:03 — Advice for Young Entrepreneurs

## Frequently Asked Questions
- **Q:** How did Unkey get started? — **A:** James Perkins says his co-founder Andreas pitched a small joint marketing project between Clerk, where James worked, and Upstash, where Andreas worked. James saw more in it, recalling, "I sat there and thought, this is actually much bigger problem than most people realize." [04:21]
- **Q:** How can API keys limit usage for AI products? — **A:** James Perkins explains that Unkey lets developers set how many times a key can be used, which suits products selling a fixed number of generations. As he put it, "we introduced something called limited use keys," [09:39] and the key stops working once it hits its limit.
- **Q:** Can Unkey handle sudden spikes in API traffic? — **A:** James Perkins says scalability was a top priority from the start, and the system stayed solid when one customer jumped from about 30,000 requests a day. He recalled that "one of our customers threw something like 3 million requests in a day through the system." [14:11]
- **Q:** What would James Perkins do differently when building Unkey's API? — **A:** James points to the API, which went from TypeScript to Go and later back to TypeScript. The first switch was painful for early users, and he said "we actually had to tell people to, you need to go and recreate all of" [22:14] the keys produced in the original MVP.
- **Q:** What is on Unkey's roadmap? — **A:** James Perkins describes a globally distributed gateway, along with tools such as SDK and documentation generation. He said, "What we want to bring is a one to two click gateway that will allow you to protect an entire API" [18:38] or an entire web app.
