how netflix directs 1 3rd of
play

How Netflix directs 1/3rd of Haley Tucker QCon San Francisco - PowerPoint PPT Presentation

How Netflix directs 1/3rd of Haley Tucker QCon San Francisco Mohit Vora Nov 16, 2015 Playback Overview DATA PLANE NETFLIX STREAM DEVICE (CDN) CONTROL PLANE Project 366 #59; 280212 Days Gone By..., CC BY-SA, Pete 2012, Flickr VIDEO


  1. How Netflix directs 1/3rd of Haley Tucker QCon San Francisco Mohit Vora Nov 16, 2015

  2. Playback Overview

  3. DATA PLANE NETFLIX STREAM DEVICE (CDN) CONTROL PLANE

  4. Project 366 #59; 280212 Days Gone By..., CC BY-SA, Pete 2012, Flickr

  5. VIDEO AUDIO TEXT STREAMS

  6. How do we build a streaming “tape”?

  7. Determine the preferred experience TITLE COUNTRY DEVICE CUSTOMER NETWORK CONNECTIONS Broadband - wired or wifi Cellular - Edge, 3G, LTE, ...

  8. That’s exactly what I want ...now where can I get it?

  9. Point the device to appropriate locations Steering

  10. PLAYBACK MANIFEST GENERATE PLAYBACK PLAYBACK MANIFEST MANIFEST

  11. Uh-oh, the content is encrypted! Keymaster, CC BY-SA, Sean McGrath 2007, Flickr

  12. LICENSE LICENSE

  13. And...Action!

  14. SESSION EVENTS SESSION (START, STOP, PAUSE, RESUME, KEEPALIVE)

  15. PLAYBACK LIFECYCLE GENERATE PLAYBACK PLAYBACK MANIFEST MANIFEST LICENSE SESSION (START, STOP, PAUSE, RESUME, KEEPALIVE)

  16. Data Plane (CDN)

  17. What is a Content Delivery Network?

  18. Open Connect A NETFLIX ORIGINAL

  19. D E M A S E E R T T Y S B CONTENT RANK PREDICTABLE VIEWING PATTERNS

  20. FILLING WHEN YOU SLEEP Dreaming…, CC BY-SA, Eleni Boulsaiki 2009, Flickr

  21. ONE WAY, CC BY-SA, Kenny Louie 2010, Flickr Open Connect A NETFLIX ORIGINAL READ XOR WRITE FILLING WHEN YOU SLEEP

  22. Content Delivery Mechanisms

  23. DATA PLANE NETFLIX STREAM DEVICE (CDN) CONTROL PLANE

  24. NETFLIX ISP STREAM ROUTER DEVICE ISP DATA CENTER

  25. NETFLIX ISP STREAM ROUTER DEVICE ISP DATA CENTER ISP CO-LOCATION

  26. NETFLIX ISP STREAM ROUTER DEVICE ISP DATA CENTER

  27. IXP DATA ISP CENTER ROUTER NETFLIX ISP STREAM ROUTER DEVICE NFLX ROUTER ISP DATA CENTER NETFLIX

  28. IXP DATA ISP CENTER ROUTER NETFLIX ISP STREAM ROUTER DEVICE NFLX ROUTER ISP DATA CENTER NETFLIX

  29. IXP DATA ISP CENTER ROUTER NETFLIX ISP STREAM ROUTER DEVICE NFLX ROUTER ISP DATA CENTER NETFLIX IXP INTERCONNECTION

  30. Control Plane

  31. OPEN CONNECT NETFLIX STREAM DEVICE CDN Network Proximity DEVICE CONTROL CONTROL DON’T KEEP SECRETS Content Positioning PLANE PLANE Load Distribution

  32. Network Proximity Social Network in a Course, CC BY-SA, Hans Põldoja 2010, Flickr

  33. By Specification?

  34. By Specification? Doesn’t scale

  35. TAKEAWAY Use BGP Border Gateway Protocol BGP ROUTE 175.231.128.0/24 (+ proximity attributes)

  36. IXP DATA ISP1 DATA CENTER CENTER ISP1 ISP2 DATA CENTER NFLX ISP2 BGP ROUTES ISP1 BGP ROUTES BGP ROUTE CONTROL 175.231.128.0/24 PLANE (+ proximity attributes)

  37. Content Positioning

  38. SERVE CACHE MISS ISP DATA CENTER LOCALIZE TRAFFIC

  39. HOW DO WE DETERMINE WHAT CONTENT WILL BE POPULAR TOMORROW?

  40. CHANGING CATALOG

  41. EVOLVING MEMBER TASTES

  42. ISP OFF PEAK DATA CENTER FILL MINIMIZE FILL CHURN

  43. D E M A S E E R T T Y B S CONTENT RANK USE HISTORICAL DATA bytesStreamed/bytesStored

  44. IS ONE DAY OF HISTORY ENOUGH?

  45. TAKEAWAY Weigh Recent Data Higher � � � � � … WEIGHT � = 0.9 0 10 20 30 40 DAYS AGO EXPONENTIALLY WEIGHTED MOVING AVERAGE

  46. HOW SHOULD CONTENT BE ALLOCATED?

  47. HOW SHOULD CONTENT BE ALLOCATED? MILLIONS THOUSANDS OF FILES OF SERVERS

  48. TAKEAWAY Consistent Hashing SVR3 FILE1 SVR4 FILE1 SVR1 SVR2 FILE3 ALLOCATE MULTIPLE REPLICAS RESILIENT TO CLUSTER CHANGES REPEATABLE

  49. IXP DATA ISP1 DATA CENTER CENTER ISP2 DATA WHAT TO FILL? CENTER FILL OVER HTTP WHERE TO FILL FROM? CONTROL S3 PLANE

  50. Load Distribution

  51. LOTS OF THROUGHPUT STREAMED BYTES LOTS OF STORAGE CONTENT RANK CONTENT WITH CONFLICTING CONSTRAINTS

  52. TAKEAWAY Tier Infrastructure MEMORY SSD S P I N N I N G D I S K SSD BASED SPINNING DISK STREAMED BASED BYTES CONTENT RANK WITHIN CLUSTERS ON EACH SERVER

  53. HOW DO WE BALANCE LOAD? BALANCE BALANCE ACROSS EQUIDISTANT ACROSS SERVERS CLUSTERS WITHIN CLUSTERS

  54. OPEN CONNECT NETFLIX STREAM DEVICE LOAD BALANCER CDN DEVICE CONTROL CONTROL PLANE PLANE

  55. HOW DO WE BALANCE LOAD? USING CONTENT DISTRIBUTION

  56. AND WHEN WE HAVE EQUALLY ATTRACTIVE LOCATIONS TO SERVE FROM – FLIP A COIN

  57. MAX S M C E I R T T S SANE INSANE E Y M S INCIDENT LOAD HOW DO WE LOAD SERVERS OPTIMALLY?

  58. … AMIDST EVER CHANGING INTERNET WEATHER

  59. TRAFFIC t … AND DAILY TRAFFIC EBBS AND FLOWS

  60. CONTROL + TRAFFIC EFFECT ON SERVE - SYSTEM METRICS STREAMS FEEDBACK WE INTRODUCE A FEEDBACK LOOP

  61. TAKEAWAY PID CONTROLLER

  62. TAKEAWAY PID CONTROLLER Process Current RPM System Metrics Variable System Metrics Set Point Desired RPM Max Control Controlled Input Voltage Traffic Variable DC MOTOR

  63. TAKEAWAY PID CONTROLLER Process Current RPM System Metrics Variable System Metrics Set Point Desired RPM Max Control Controlled Input Voltage Traffic Variable LOADING SERVERS

  64. IXP DATA ISP1 DATA CENTER CENTER ISP2 DATA CONTROL CENTER TO 80% NO CONTROL CONTROL 0.0 < CONTROL VAR < 1.0 PLANE

  65. NEXT HOP TRAFFIC t TRAFFIC SHIFTS TO NEXT HOP LOCATION

  66. Steering

  67. OPEN CONNECT NETFLIX STREAM DEVICE KAFKA Yes, here’s the URLs CDN STEERING CONTROL PLAYBACK Got URLs for PLANE SERVICES f1, f2, …, fn? CASS PROXIMITY HEALTH CONTENT

  68. Architecture Evolution 5 CHALLENGES

  69. How did we evolve from here... MANIFEST STEERING SESSION API LICENSE DRM

  70. ...to here. MANIFEST CLIENT SCRIPTS STEERING RULES INSIGHTS SESSION SERVICE LAYER CACHE API LICENSE DRM 5 SOLUTIONS

  71. High dimensionality CHALLENGE TITLE COUNTRY DEVICE CUSTOMER NETWORK CONNECTIONS Broadband - wired or wifi Cellular - Edge, 3G, LTE, ...

  72. How can we quickly alter the playback experience in a targeted manner?

  73. USE CASE Stream Filtering RULES ENGINE ALL BEST STREAMS STREAMS FOR FOR CONTENT SESSION

  74. EXAMPLE RULES

  75. UPDATING RULES PUBLISH CONFIGURATION MANAGEMENT UI TOPIC SUBSCRIBE RULES ENGINE

  76. TAKEAWAY Dynamic Business Rules MANIFEST STEERING RULES API SESSION LICENSE DRM

  77. CHALLENGE Pinpoint what is broken Haystacks, CC BY-SA, John Pavelka 2008, Flickr

  78. 3:00 AM : Pager goes off

  79. METRICS AND ALERTING

  80. OK...error code 105 is elevated. But why?

  81. Indexed Logging

  82. TAKEAWAY Detailed Domain Insights MANIFEST STEERING RULES INSIGHTS API SESSION LICENSE DRM

  83. Large amount of state CHALLENGE

  84. How can we enable faster UIs and low-end devices?

  85. We introduced a server-side caching tier MANIFESTS CUSTOMER A CUSTOMER B CUSTOMER A

  86. Watch out for resiliency issues!! Ping Pong project, CC BY-SA, Michael Knowles 2008, Flickr

  87. TAKEAWAY Reduce client state MANIFEST STEERING RULES INSIGHTS API SESSION CACHE LICENSE DRM

  88. Managing device protocols CHALLENGE Square peg, round hole, CC BY-SA, Simon Law 2006, Flickr

Recommend


More recommend