# S5 E27: Edge Caching for GraphQL APIs with Max Stoiber of GraphCDN (Stellate)

Published: 2021-12-14
Duration: 2316s
Audio: https://pdst.fm/e/pscrb.fm/rss/p/audio4.redcircle.com/episodes/c1ec7765-2b51-4191-8ca6-400d979ab661/stream.mp3

## Key Takeaways
- Born From Spectrum's Outages: As Spectrum's CTO, Max saw the service crash once or twice daily for months. Most posts were identical for every user, and he believes an API cache could have cut traffic tenfold.
- Fast Invalidation Is Essential: Edits to cached API data must show up almost immediately, everywhere. Co-founder Tim spent three months of nights and weekends researching providers and landed on Fastly.
- Rules Beat Per-Type Config: Configuring cache settings type by type got unwieldy on huge GraphQL schemas. The team spent a week or two re-architecting around reusable rules that group types by business use case.
- Speed Over Developer Experience: GraphCDN runs on Fastly's Compute@Edge despite what Max calls rough edges and a poor developer experience, because its speed matters to customers such as e-commerce companies.
- Invest in People Early: GraphCDN hired Sue Odeo, who had scaled startups past 100 employees, to run its people function early on. Max still says they waited too long to hire and would start sooner.

Max Stoiber was born and raised in a small town, just outside of Vienna, Austria. From a young age, his biggest influence was his mother, who left her job to start her own business as a medical expert in the courts. It has been inspiring for Max to watch her find her place in the world, and to box through everything life threw at her. He still finds great inspiration from that today. And, very early on, he was focused on doing something on his own.

When he's not staring at his computer screens, he likes to get outside and boulder with this friends. He got into the sport through other fellow geeks, and he feels that bouldering in Vienna is pretty much a nerd sport. He's also a trained skiing instructor, and really into coffee, as a certified barista.

Prior to his current venture, Max has had some great success in the open source world, and building a chat tool called Spectrum - which was a platform for community chat. Eventually, Github acquired the product, and opened a whole new set of problems around architecting a large scale, real time system. Through a difficult period of learning and service outages, he learned and figured out a better way to reduce traffic up to 95% with edge caching.

This is the creation story of [GraphCDN](https://graphcdn.io/).

Sponsors

- [Courier](http://courier.com/codestory)
- [Img.ly](https://img.ly/codestory)
- [Routable](https://apply.workable.com/routable/?lng=en)
- [CTO.ai](http://go.cto.ai/codestory)
- [Cloudways](https://www.cloudways.com/en/) offers peace of mind and flexibility so you can focus on growing your business instead of dealing with server management. With Cloudways, you get an optimized stack, managed servers, backups, staging environment, integrated Git, pre-configured, Composer, 24/7 support, and a choice of five cloud providers: AWS, DigitalOcean, Linode, Google Cloud, and Vultr. Get up to **2 Month** Free Hosting by using code "**CODE30**" and get **$30** free hosting credit.

Links

- Website: [https://graphcdn.io/](https://graphcdn.io/)
- LinkedIn: [https://www.linkedin.com/in/mxstbr/](https://www.linkedin.com/in/mxstbr/)
- [The Mom Test](https://www.amazon.com/Mom-Test-customers-business-everyone/dp/1492180742)

  

Timestamps

00:00 – Intro

04:48 – The GitHub Acquisition

07:32 – The Origins of GraphCDN

10:43 – Building the GraphCDN MVP

14:03 – MVP Decisions and Tradeoffs

17:49 – Shaping the GraphCDN Roadmap

20:31 – Building the GraphCDN Team

24:47 – Scaling on the Edge

27:02 – Proudest Accomplishments

29:22 – Learning From Mistakes

31:01 – The Future of GraphCDN

32:31 – Max's Biggest Influences

34:04 – What Max Would Change

35:40 – Advice for New 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 Max Stoiber from GraphCDN: [https://www.codestory.co/episodes/s5-e27-fixing-the-edge-dropping-traffic-by-95-with-max-stoiber-of-graphcdn-stellate/](https://www.codestory.co/episodes/s5-e27-fixing-the-edge-dropping-traffic-by-95-with-max-stoiber-of-graphcdn-stellate/)

  
  

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  
* Check out Perplexity: https://pplx.ai/codestory  
  
  
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
- 4:48 — The GitHub Acquisition
- 7:32 — The Origins of GraphCDN
- 10:43 — Building the GraphCDN MVP
- 14:03 — MVP Decisions and Tradeoffs
- 17:49 — Shaping the GraphCDN Roadmap
- 20:31 — Building the GraphCDN Team
- 24:47 — Scaling on the Edge
- 27:02 — Proudest Accomplishments
- 29:22 — Learning From Mistakes
- 31:01 — The Future of GraphCDN
- 32:31 — Max's Biggest Influences
- 34:04 — What Max Would Change
- 35:40 — Advice for New Entrepreneurs

## Frequently Asked Questions
- **Q:** What problem led to the creation of GraphCDN? — **A:** Max Stoiber ran into scaling trouble as CTO of Spectrum, where most posts were the same for every user but requests still went to the database. As Max put it, "We should just be putting a cache in front of our GraphQL API" [09:12].
- **Q:** Why is cache invalidation so important for GraphQL edge caching? — **A:** Max explains that API data is often very dynamic, so an edited news article can't sit stale in a cache for 10 or 15 minutes. He said "you need to be able to invalidate the cache really, really, really quickly" [11:51], which is even harder across worldwide edge locations.
- **Q:** How did GraphCDN's cache configuration change after the private beta? — **A:** The first system had users attach cache control settings to individual types in a large JSON or YAML file. Max said "we very quickly realized that that gets unwieldy incredibly quickly" [15:03], so the team moved to rules that apply when a query contains certain types or fields.
- **Q:** Why is GraphCDN built on Fastly's Compute@Edge? — **A:** Max says Fastly handles enormous traffic and was by far the fastest edge provider the team tested, even though its developer experience was rough at the time of the interview. In his words, "It is so fast that we're happy to incur that developer experience hit" [26:27].
- **Q:** What advice does Max Stoiber give young entrepreneurs about building something people want? — **A:** Max recommends reading The Mom Test and asking potential customers what problems they have before pitching anything. His summary is that "you don't talk about your solution, you talk about their problems" [37:02].
