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.

Scalable service architectures @ VDB16

274 views

Published on

Scalable service architectures talk from Voxxed Belgrade 2016.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Scalable service architectures @ VDB16

  1. 1. Scalable Service Architectures Lessons learned Zoltán Németh Sr Engineering Manager, Streaming & PlayerAn IBM company
  2. 2.  Founded in 2007, acquired by IBM in 2016  Live streaming and VOD  Freemium / Pro / Demand / Align An IBM company
  3. 3. Streaming flow
  4. 4. Now back to 2009...
  5. 5. Earthquake in Japan Protests in Ukraine, Egypt, Syria Asteroid Approach SpaceX Launch El Classico
  6. 6. We must scale
  7. 7. Defining scalability Scalability is the ability to handle increased workload by repeatedly applying a costeffective strategy for extending a system’s capacity. (CMU paper, 2006) How well a solution to some problem will work when the size of the problem increases. When the size decreases, the solution must fit. (dictionary.com and Theo Schlossnagle, 2006)
  8. 8. Self-contained service  Explicitly declare and isolate dependencies  Isolation from the outside system  Static linking  Pay attention to GPL  Do not rely on system packages
  9. 9. Disposability  Maximize robustness with fast startup and graceful shutdown  Disposable processes  Graceful shutdown on SIGTERM  Handling sudden death: robust queue backend
  10. 10. Backing Services  Treat backing services as attached resources  No distinction between local and third party services  Easily swap out resources  Export services via port binding  Become the backing service for another app Drawing source: 12factor.net
  11. 11. Processes, concurrency  Stateless processes (not even sticky sessions)  Process types by work type  We <3 linux process  Container > VM  Shared-nothing  adding concurrency is safe  Process distribution spanning machines
  12. 12. Statelessness  Store everything in a datastore  Aggregate data  Aggregator / map & reduce  CQEngine  Chandra  Scalable datastores  Handling user sessions
  13. 13. Microservices  Self-contained  Disposable  Stateless  Shared-nothing  API communication  Dependency management moved to external  Be Warned! Image credits: christofcoetzee.co.za, techblog.netflix.com
  14. 14. Monitoring  Metrics collecting  Graphite, New Relic  Self-aware applications  Cluster state  Zookeeper, Consul  Scaling decisions  Capacity amount  Graph derivative  App requests
  15. 15. Load Balance  DNS or API  App level balance  Uniform entry point or proxy  Balance decisions  Load  Zookeeper state  Resource policies
  16. 16. Service Separation  Rate limiting  Failure is inevitable  Circuit Breaker pattern  Stop cascading failure, allow recovery  Fail fast, fail silent  Hystrix  Service decoupling  Asynchronous operations
  17. 17. Deployment  Automate all the things  Chef & VMs  Docker  Immutable deployment  Docker / Kubernetes / Rancher  Handling tasks before shutdown
  18. 18. Extras  Debugging features  Log processing: Logstash, Kibana  Clojure / JS consoles  Runtime configuration via env  Scaling API  Cloud providers  Automatic start / stop
  19. 19. Reading  Scalable Internet Architectures by Theo Schlossnagle  The 12-factor App: http://12factor.net/  Carnegie Mellon Paper: http://www.sei.cmu.edu/reports/06tn012.pdf  Circuit Breaker: http://martinfowler.com/bliki/CircuitBreaker.html  Release It! by Michael T. Nygard  Netflix Tech Blog: http://techblog.netflix.com/
  20. 20. Questions? syntaxerror@hu.ibm.com

×