microservice layout in netflix polyglot persistence
play

Microservice Layout in Netflix Polyglot Persistence Powering - PowerPoint PPT Presentation

Microservice Layout in Netflix Polyglot Persistence Powering Microservices Roopa Tangirala Engineering Manager Netflix Agenda 5 Use Cases Challenges Current Approach Takeaway AWS S3 CDE Search, Analyze and visualize in


  1. Microservice Layout in Netflix

  2. Polyglot Persistence Powering Microservices Roopa Tangirala Engineering Manager Netflix

  3. Agenda • 5 Use Cases • Challenges • Current Approach • Takeaway

  4. AWS S3 CDE

  5. Search, Analyze and visualize in near real time Distributed in-memory caching solution based on memcached Distributed NOSQL database to handle large datasets providing high availability. Distributed dynamo layer for different storage engines and protocols supporting Redis, memcached, RocksDB TitanDB is scalable graph database optimized for storing and querying graph datasets.

  6. Eu-west-1 Ireland Us-west-2 Oregon Us-east-1 North Virginia

  7. CDN URL

  8. Requirements - CDN URL • High availability • Very low latency reads/writes (less than 1ms) • High Throughput per node

  9. GUESS?

  10. Distributed In Memory Very low Latency responses

  11. Playback Error

  12. PLAYBACK CONTEXT (Tracks + Track Urls) NETFLIX OPENCONNECT CDN URLS

  13. COUNTRY USER DEVICE PREFERENCES PLAYBACK CONTEXT TITLE NETWORK METADATA

  14. Requirements - Playback Error • Quick Incident Resolution • Interactive Dashboards • Near realtime Search • Ad Hoc Queries

  15. GUESS?

  16. Powerful Search & Analytics Interactive Dashboards

  17. Interactive Exploration

  18. Top N queries

  19. Incident To Resolution Time Under 10 2+ Hours Minutes

  20. Viewing History

  21. Requirements - Viewing History • Time series dataset • Support high writes • Cross region replication • Large dataset

  22. Growth of Viewing History 33

  23. GUESS?

  24. Multi-datacenter, multi-directional replication Highly availability and scalability

  25. Data Model 36

  26. New Data Model 37

  27. Digital Asset Management Person Display Movie Character Set A Video TEXT Audio Display Artwork Track Track Track Set B Webp Fr Video Fr Es PNG Montage JPG Trailer Dub Seg Sub Sub

  28. Requirements - DAM • One backend plane for all asset metadata • Storage of relationships/connected data • Searchable

  29. GUESS?

  30. Distributed GraphDB Support for various storage backends

  31. Distributed Delayed Queues

  32. Requirements - Delayed Queues • Distributed • Highly concurrent • At-least-once delivery semantics • Delayed queue • Priorities within the shard

  33. GUESS?

  34. Pluggable datastore supporting Redis Multi-datacenter replication

  35. Data Model For each queue three set of Redis data structures are maintained: 1. A Sorted Set containing queued elements by score. 2. A Hash set that contains message payload, with key as message ID. 3. A Sorted Set containing messages consumed by client but yet to be acknowledged. Un-ack set.

  36. Prediction @ CDE

  37. Current Approach

  38. Subject Matter Expert

  39. CDE Service Empowering CDE to provide datastores as a service

  40. CDE Service •Thresholds/SLAs •Cluster metadata •Self Service •Contact information •Maintenance windows

  41. Architecture Mantis Alert Atlas MONITORING R S E C M H E E D D Datastore I PAGE U A Maintenance CDE L T E I R O Remediation N Alert if needed Cluster Metadata/ CDE SERVICE Advisor Cluster Metadata

  42. SLA cass_xyz abc@netflix.com cde abc@netflix.com

  43. 10 6 4 cas_xyz 34 343 4 2 34 abc@netf lix.com 3 34 2 abc@netf 65 6 5 lix.com cass_abc xyz@netfl ix.com 5 34 55 xyz@netfl 65 56 56 ix.com cass_test

  44. Machine learning Automic (UC4)

  45. Pattern in Disk usage

  46. Cde Channel

  47. Common Approach CRON System Job Job Runner Job Runner Job Runner Runner

  48. Streaming micro-services Source - input, handles backpressure Stage - business logic Sink - output, handles backpressure Source Source Stage Mantis Stage Source Job Sink Sink Stage Sink Source Stage Sink

  49. Real Time Dash (Macro View) cluster_3 cluster_6

  50. Real Time Dash (Cluster View) 1

  51. Takeaway

Recommend


More recommend