Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Story of why we migrate to gRPC and how we go about it

The Story of why we migrate to gRPC and how we go about it

At Spotify, we have historically built services based on our own proprietary messaging protocol and framework. Last year we finally kicked off the daunting multi-year task of migrating everything to gRPC.

Migrating over 1000 services to gRPC poses interesting challenges, many of them are not only technical in nature: they boil down to questions of engineering culture and leadership at scale: How do you get 200 autonomous engineering teams to align on something as fundamental and cross-cutting as a new RPC framework? How do you roll-out gRPC at scale whit minimal disruption to both the organization and to the end-user?

This presentation will address these questions alongside more technical discussions of advanced gRPC concepts such as interceptors, deadlines, and effective schema management and how they are essential in large distributed systems.

Matthias Grüter

May 22, 2019
Tweet

More Decks by Matthias Grüter

Other Decks in Programming

Transcript

  1. The Story of why we migrate to gRPC and how

    we go about it @mattgruter 2019-05-22
  2. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter “Developers don’t

    care about new RPC technologies” -- someone at KubeCon 2018
  3. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Spotify’s Infrastructure

    200M active monthly users 8M QPS at ingress 1k developers 2.5k services Java, Python, ...
  4. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Hermes -

    Written in 2012 - Based on ZeroMQ - JSON or Protobuf payload - Not a RPC framework
  5. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Code Generation

    Java, Golang, Python, Ruby, Dart, PHP, Node.js, Objective-C, C#, C++
  6. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Schema Management

    3. Version on the proto package package spotify.playlist.v1; package spotify.playlist.v2beta1;
  7. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Load Balancing

    Server-side proxy dumb client extra hop Client-side no proxy complex client low latency
  8. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Load Balancing

    Server-side proxy dumb client extra hop Client-side no proxy complex client low latency Lookaside no proxy thinner client low latency
  9. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Our Journey

    Hermes gRPC 10% Distance Travelled 90% Remaining Distance to Destination
  10. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Our Journey

    Hermes Not Hermes 10% Distance Travelled 90% Remaining Distance to Destination
  11. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Our Journey

    Hermes gRPC 10% Distance Travelled 90% Remaining Distance to Destination
  12. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter 2. Don’t

    force it! Code generation Resiliency patterns Tracing
  13. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter 2. Don’t

    force it! Code generation Resiliency patterns Tracing <Fancy Tool X>
  14. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter aka. never-ending

    migration aka. yet another protocol Hermes gRPC In case of emergency
  15. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter Our Journey

    Hermes gRPC 10% Distance Travelled 90% Remaining Distance to Destination
  16. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter “Developers don’t

    care about new RPC technologies” -- overheard at KubeCon 2018 Seattle
  17. gRPC at Spotify- KubeCon/CloudNativeCon Europe 2019 - @mattgruter “Developers don’t

    have to care about new RPC technologies” -- “overheard” at KubeCon 2019 Barcelona