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.

Integrating Node.js Into Your Ecosystem

3,824 views

Published on

https://www.youtube.com/watch?v=ubQzzOcU-pU

The story of how we integrated Node.js into the Netflix ecosystem. This talk was given at NodeDay 2014 @ Intuit.

Image credits are as follow, which are free for non commercial use. If you would like your image removed, please let me know and I will update it.



Images

Oz The Great and Powerful
http://www.themoviedb.org/movie/68728-oz-the-great-and-powerful/backdrops

Puzzle of complexity
https://www.flickr.com/photos/picturewendy/8365723674/

Blades
https://www.flickr.com/photos/zagrobot/2731084578/

Question
https://www.flickr.com/photos/weesen/3588493923

Dictionary
https://ww2.distek.com/blog/mbsd-data-dictionary/

All The Things
http://hyperboleandahalf.blogspot.com/2010/06/this-is-why-ill-never-be-adult.html

Light Bulb Icon
http://pixabay.com/p-151383/?no_redirect

Light Bulb
https://www.flickr.com/photos/joffi/5176923568/

Sandbox
http://commons.wikimedia.org/wiki/File:Sandbox_with_toys_detail.JPG

Chicken and Egg
http://painwithjoy.blogspot.com/2013/03/chicken-or-egg-fms-or-digestive-trouble.html

Kid Stormtrooper
http://car-memes.com/these-are-not-the-droids-you-39-re-looking-for/

Prana backdrop
http://breastcanceryogablog.com/tag/prana/

Batman and Robin
I can’t remember where I found this image. Let me know if you find out! AFAIK, this is from the SDCC 08 convention.

The Noun Project
Jam designed by Joe Harrison from the thenounproject.com
Tire designed by Ryan Spiering from the thenounproject.com

Unsplash
https://unsplash.imgix.net/uploads/14131528928453585b6dc/829d24cf?q=75&fm=jpg&s=eaf9f7f2b07eabc753b9ea3c7c65b2d7

Published in: Technology

Integrating Node.js Into Your Ecosystem

  1. 1. Integrating Node into your ecosystem
  2. 2. hello world Alex Liu @stinkydofu aliu@netflix.com
  3. 3. node.js
  4. 4. $ npm install service-discovery npm ERR! 404 Not Found $ npm install dynamic-config npm ERR! 404 Not Found $ npm install metrics-client npm ERR! 404 Not Found
  5. 5. What is your goal? answer the simple questions first.
  6. 6. “ I want to use …
  7. 7. “ I want to use node.js
  8. 8. “ I don’t want to rebuild my entire app
  9. 9. “ I want to move incrementally
  10. 10. “ I am going off the paved road
  11. 11. The 6 Step Plan ( aka, The Netflix Story™ )
  12. 12. 1 Identify your ecosystem.
  13. 13. What does your ecosystem look like? your answer can make a difference!
  14. 14. monolithic application A single-tiered software application in which the user interface and data access code are combined into a single program from a single platform.
  15. 15. UI business logic data access logic database
  16. 16. UI business logic data access logic
  17. 17. UI business logic data access logic
  18. 18. SOA (service oriented architecture) A design pattern based on distinct pieces of software providing application functionality as services to other applications via a protocol.
  19. 19. UI service business logic service service business logic business logic
  20. 20. REST all the things!
  21. 21. service service service
  22. 22. service service service
  23. 23. service service service
  24. 24. service service service
  25. 25. 2 Use configurable routing
  26. 26. reverse proxy /home /test service service service
  27. 27. Use a reverse proxy as a configurable routing layer. top tip
  28. 28. /home /profil e
  29. 29. Control Test
  30. 30. 90% 10%
  31. 31. US EU
  32. 32. ON
  33. 33. OFF
  34. 34. Avoid subdomains. top tip
  35. 35. 3 Identify necessary ecosystem services.
  36. 36. service discovery discover, and be discovered
  37. 37. service discovery > registration > health check > client discovery
  38. 38. configuration configuration management on a per environment basis
  39. 39. configuration > storage > (de-)centralized config > dynamic config
  40. 40. metrics observability is of the utmost importance
  41. 41. metrics > observability > real time metrics > monitoring > alerts > logging vs. metrics
  42. 42. build + deploy determine your minimum units of deployment
  43. 43. build + deploy > VMs > AMIs > CI + CD > Docker
  44. 44. What are our options?
  45. 45. 4 Rebuild or reuse?
  46. 46. Measure success by the cost of maintenance. top tip
  47. 47. Rebuild
  48. 48. It’s an opportunity for a fresh start. Rebuild
  49. 49. Lightweight modules are great for prototyping. Rebuild
  50. 50. Don’t rebuild your entire ecosystem. Rebuild
  51. 51. Chicken, meet Egg.
  52. 52. Reuse
  53. 53. You’re not reinventing the wheel. Reuse
  54. 54. You can reduce overall platform maintenance cost. Reuse
  55. 55. It’s a medium-term migration strategy. Reuse
  56. 56. You can stay focused on your goal. Reuse
  57. 57. > reverse proxy / configurable routing > service discovery > service client(s) > configuration > metrics > build + deployment
  58. 58. But it’s not JavaScript. :(
  59. 59. 5 Add a sidecar to reuse existing code.
  60. 60. sidecar A process which runs on instance along with your application, hosting all the things necessary for it to integrate seamlessly within an existing ecosystem.
  61. 61. main process sidecar
  62. 62. J
  63. 63. main process sidecar
  64. 64. service service service
  65. 65. Don’t add new functionality in your sidecar. sidecar top tip
  66. 66. Rebuild Reuse > configuration > metrics collection > dynamic configuration > configurable routing > service discovery > builds + deployment > metrics reporting
  67. 67. Use light weight modules. sidecar top tip
  68. 68. [LIGHT] config client [FULL] config client
  69. 69. [LIGHT] config client [FULL] config client http://127.0.0.1/config?id=configA&id=configB&id=configC
  70. 70. [LIGHT] config client [FULL] config client config service http://127.0.0.1/config?id=configA&id=configB&id=configC
  71. 71. [LIGHT] config client [FULL] config client > serialization > deserialization > caching + TTL > retries > env logic > REST calls config service
  72. 72. The sidecar is a black box. sidecar top tip
  73. 73. [LIGHT] config client [FULL] config client > serialization > deserialization > caching + TTL > retries > env logic > REST calls config service
  74. 74. [LIGHT] config client > REST calls config service
  75. 75. [LIGHT] config client > REST calls config service
  76. 76. config service [FULL] config client > serialization > deserialization > caching + TTL > retries > env logic
  77. 77. metrics [collection] metrics [reporting]
  78. 78. Watch your resource management. sidecar top tip
  79. 79. inbound outbound
  80. 80. inbound outbound
  81. 81. inbound outbound
  82. 82. inbound outbound
  83. 83. Real time metrics are a must. sidecar top tip
  84. 84. Sidecar Prana https://github.com/Netflix/Prana
  85. 85. 6 node.js it up!
  86. 86. Don’t worry, I got it.
  87. 87. thank you Alex Liu @stinkydofu aliu@netflix.com

×