Microservice Layout in Netflix Polyglot Persistence Powering - - PowerPoint PPT Presentation
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
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 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.
Us-west-2 Oregon Us-east-1 North Virginia Eu-west-1 Ireland
CDN URL
Requirements - CDN URL
- High availability
- Very low latency reads/writes (less than 1ms)
- High Throughput per node
GUESS?
Distributed In Memory Very low Latency responses
Playback Error
PLAYBACK CONTEXT (Tracks + Track Urls)
NETFLIX OPENCONNECT CDN URLS
PLAYBACK CONTEXT
COUNTRY USER PREFERENCES TITLE METADATA DEVICE NETWORK
Requirements - Playback Error
- Quick Incident Resolution
- Interactive Dashboards
- Near realtime Search
- Ad Hoc Queries
GUESS?
Powerful Search & Analytics Interactive Dashboards
Interactive Exploration
Top N queries
Incident To Resolution Time
2+ Hours Under 10 Minutes
Viewing History
Requirements - Viewing History
- Time series dataset
- Support high writes
- Cross region replication
- Large dataset
Growth of Viewing History
33
GUESS?
Multi-datacenter, multi-directional replication Highly availability and scalability
Data Model
36
New Data Model
37
Artwork Display Set B Display Set A Character Movie Video Track PNG Webp Audio Track JPG Video Seg Es Sub Fr Dub Montage TEXT Track Trailer Fr Sub Person
Digital Asset Management
Requirements - DAM
- One backend plane for all asset metadata
- Storage of relationships/connected data
- Searchable
GUESS?
Distributed GraphDB Support for various storage backends
Distributed Delayed Queues
Requirements - Delayed Queues
- Distributed
- Highly concurrent
- At-least-once delivery semantics
- Delayed queue
- Priorities within the shard
GUESS?
Pluggable datastore supporting Redis Multi-datacenter replication
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.
Prediction @ CDE
Current Approach
Subject Matter Expert
CDE Service
Empowering CDE to provide datastores as a service
CDE Service
- Thresholds/SLAs
- Cluster metadata
- Self Service
- Contact information
- Maintenance windows
Architecture
PAGE CDE
Alert if needed
S C H E D U L E R R E M E D I A T I O N CDE SERVICE Alert Atlas Mantis Datastore Cluster Metadata Cluster Metadata/ Advisor Maintenance Remediation MONITORING
SLA
cass_xyz abc@netflix.com cde
abc@netflix.com
10
6 4
cas_xyz
cass_abc cass_test abc@netf lix.com abc@netf lix.com xyz@netfl ix.com xyz@netfl ix.com 343
34
4 34 2 3 34 5 6 65 5 34 65 56 55 56 2
Machine learning
Automic (UC4)Pattern in Disk usage
Cde Channel
Common Approach
CRON System Job Runner Job Runner Job Runner Job Runner
Streaming micro-services
Source Stage Sink Source Stage Sink Source Stage Sink Source - input, handles backpressure Stage - business logic Sink - output, handles backpressure Source Stage Sink Mantis Job
Real Time Dash (Macro View)
cluster_3 cluster_6
Real Time Dash (Cluster View)
1