Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Finagle-Based Microservices at SoundCloud

4,870 views

Published on

From https://www.eventbrite.com/e/finaglemeetup-at-twitter-hq-tickets-12857666627

Published in: Technology

Finagle-Based Microservices at SoundCloud

  1. 1. Quick Report: Finagle-Based Microservices at SoundCloud Phil Calçado http://philcalcado.com @pcalcado
  2. 2. > 11 hours of audio uploaded every minute ~ 300 million people every month
  3. 3. Like everybody else around that time…
  4. 4. Like everybody else around that time…
  5. 5. Because ${reasons}, we decided to break the monolith. But how?
  6. 6. The Mothership SoundCloud.com
  7. 7. The Mothership Sounds ˝ & Sets Social Graph Activity Stream Premium ˝ Features Search API
  8. 8. Reminds me of something…
  9. 9. Monoliths exist when building within it is cheaper than the overhead associated with coordination of multiple components. ! !
  10. 10. We need an inexpensive services framework
  11. 11. Realistic options
  12. 12. Summary in a picture
  13. 13. Phase 1: Finatra
  14. 14. Good stuff • Model is very intuitive to people coming from other languages • Production-ready service in minutes
  15. 15. Main issues we had • Not always on latest Finagle version • Doesn't compose with Filters • Internals aren’t very flexible • twitter-server is too far away from our infra
  16. 16. Phase 2: Filters and Services
  17. 17. Where the gold was
  18. 18. We followed suit (114 LOC)
  19. 19. Routes are defined in a single file
  20. 20. Each controller is a Service
  21. 21. Lots of filters
  22. 22. Today • 100% Traffic hitting Finagle-based services • Redis, memcached, MySQL drivers used in production • About one month to ramp-up non-Scala developers
  23. 23. What is still hard • Config flags implementation isn't very flexible, we use env vars not properties • API surface space for Finagle is too large. What’s user land, what’s test, what’s internal? • Bespoke scatter-gather code all over our apps • Every organization builds their own Finagle routing
  24. 24. Up next
  25. 25. Containers for Continuous Delivery
  26. 26. Thrift/Protocol Buffers? } JSON parsing?
  27. 27. phil calçado http://philcalcado.com http://soundcloud.com/pcalcado @pcalcado www.soundcloud.com

×