microservices reativos usando a stack do netfmix na aws
play

Microservices reativos usando a stack do Netfmix na AWS Diego - PowerPoint PPT Presentation

Microservices reativos usando a stack do Netfmix na AWS Diego Pacheco Principal Software Architect at ilegra.com @diego_pacheco www.ilegra.com NetfmixOSS Stack Why Netfmix? Netfmix My Problem Billions Requests Per Day Social


  1. Microservices reativos usando a stack do Netfmix na AWS Diego Pacheco Principal Software Architect at ilegra.com @diego_pacheco

  2. www.ilegra.com

  3. NetfmixOSS Stack

  4. Why Netfmix? Netfmix My Problem  Billions Requests Per Day  Social Product  1/3 US internet  Social Network bandwidth  Video  ~10k EC2 Instances  Docs  Multi-Region  Apps  100s Microservices  Chat  Innovation + Solid  Scalability Service  Distributed T eams  SOA, Microservices and  Could reach some DevOps Benchmark Web Scale

  5. AWS

  6. Cloud Native

  7. Principles  Stateless Services  SOA  Ephemeral Instances  Microservices  Everything fails all the  No Central Database  NoSQL time  Auto Scaling / Down  Lightweight Serializable Scaling Objects  Multi AZ and multi  Latency tolerant Region protocols  No SPOF  DevOps Enabler  Immutable Infrastructure  Design for Failure  Anti-Fragility (expected)

  8. Right Set of Assumptons

  9. Microservices

  10. Reactive

  11. Java Drivers X REST X

  12. Simple View of the Architecture UI Zuul Microservice Cassandra Cluster

  13. Stack

  14. OSS

  15. Zuul

  16. Zuul

  17. Karyon: Microbiology - Nucleus

  18. RxNetty  Reactive Extensions + Netty Server  Lower Latency under Heavy Load  Fewer Locks, Fewer Thread Migrations  Consumes Less CPU  Lower Object Allocation Rate

  19. Karyon: CODE

  20. Karyon: Reactive

  21. Karyon: Reactive

  22. Eureka and Service Discovery http://microservices.io/patterns/server-side-discovery.html

  23. Eureka  AWS Service Registry for Mid-tier  Load balancing and Failover  REST based  Karyon and Ribbon Integration

  24. Eureka

  25. Eureka and Service Discovery

  26. Availability

  27. Histryx

  28. Ribbon  IPC Library  Client Side Load Balancing  Multi-Protocol (HTTP, TCP, UDP)  Caching*  Batching  Reactive

  29. Ribbon CODE

  30. Ribbon CODE

  31. RX-Java  Reactive Extension of the JVM  Async/Event based programming  Observer Pattern  Less 1mb  Heavy usage by Netfmix OSS Stack

  32. Archaius  Confjguration Management Solution  Dynamic and T yped Properties  High Throughtput and Thread Safety  Callbacks: Notifjcations of confjg changes  JMX Beans  Dynamic Confjg Sources: File, Db, DynamoDB, Zookeper  Based on Apache Commons Confjguration

  33. Archaius + Git Central Property Internal GIT Files Microservice Microservice Slave Side Car Microservice Microservice Slave Side Car Microservice Microservice Slave Side Car File File File System System System

  34. Asgard

  35. Asgard

  36. Deploys Bake/Provision JOB Create Packer Launch

  37. Dynomite: Distributed Cache https://github.com/Netfmix/dynomite

  38. Dynomite  Implements the Amazon Dynamo  Similar to Cassandra, Riak and DynamoDB  Strong Consistency – Quorum-like – No Data Loss  Pluggable  Scalable  Redis / Memcached  Multi-Clients with Dyno  Can use most of redis commands  Integrated with Eureka via Prana

  39. Dynomite: Distributed Cache  Isolate Failure – Avoid cascading  Redundancy – NO SPOF  Auto-Scaling  Fault T olerance and Isolation  Recovery  Fallbacks and Degraded Experience  Protect Customer from failures – Don’t throw Failures -> Failures VS Errors

  40. Dynomite: Internals

  41. Multi-Region Cluster Eureka Server Oregon D1 Prana Eureka Server Oregon D2 Prana Prana N California D3

  42. Dynomite: CODE

  43. Dynomite Contributions https://github.com/Netflix/dynomite/pull/200 https://github.com/Netflix/dynomite/pull/207 https://github.com/Netfmix/dynomite

  44. Caos Engineering

  45. Gatling  Stress T esting  T ool  Scala DSL  Run on top of Akka  Simple to use

  46. Chaos Arch ELB Eureka Zuul Zuul Microservice N1 Microservice N2 Cassandra Cluster

  47. Running…

  48. Chaos Results and Learnings  Retry confjguration and Timeouts in Ribbon  Right Class in Zuul 1.x (default retry only SocketException)  RequestSpecifjcRetryHandler (Httpclient Exceptions)  zuul.client.ribbon.MaxAutoRetries=1  zuul.client.ribbon.MaxAutoRetriesNextServer=1  zuul.client.ribbon.OkT oRetryOnAllOperations=true Eureka Timeouts  It Works  Everything needs to have redudancy  ASG is your friend :-)  Stateless Service FTW

  49. Kafka / Storm :: Event System Microservice Producer

  50. Chaos Results and Learnings  Before:  Data was not in Elastic Search  Producers was loosing data  After:  No Data Loss  It Works  Changes:  No logging on Microservice :( (Log was added)  Code that publish events on a try-catch  Retry confjg in kafka producer from 0 to 5

  51. Main Challenges

  52. Hacker Mindset

  53. Next Steps  IPC  Spinnaker  Containers  Client side Aggregation  DevOps 2.0 -> Remediation / Skynet

  54. Pocs https://github.com/diegopacheco/netflixoss-pocs http://diego-pacheco.blogspot.com.br/search/label/netflix?max-results=30

  55. Microservices reativos usando a stack do Netfmix na AWS Obrigado! Diego Pacheco Principal Software Architect at ilegra.com @diego_pacheco

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend