bad things to you. http://techblog.netflix.com/2012/02/fault-tolerance-in-high-volume.html You isolate yourself by introducing a queuing point. But then you are limited by the number of threads in the system.
An Eventloop only does CPU work and does not block. Eventloop (Inbound) Connection Connection Connection Connection Connection Eventloop (Outbound) Connection Connection Connection Connection Connection Application Code
An Eventloop only does CPU work and does not block. A single bad dependency/connection does not bring down the system. Eventloop (Inbound) Connection Connection Connection Connection Connection Eventloop (Outbound) Connection Connection Connection Connection Connection Application Code
An Eventloop only does CPU work and does not block. As many Eventloops as CPUs. A single bad dependency/connection does not bring down the system. Eventloop (Inbound) Connection Connection Connection Connection Connection Eventloop (Outbound) Connection Connection Connection Connection Connection Application Code Eventloop (Inbound) Connection Connection Connection Connection Connection Eventloop (Outbound) Connection Connection Connection Connection Connection Eventloop (Inbound) Connection Connection Connection Connection Connection Eventloop (Outbound) Connection Connection Connection Connection Connection
-> Catalog::videos) .flatMap(video -> Observable.zip(bookmarkClient.createGet("http://bookmarkservice/" + video.id()) .<Bookmark>flatMap(HttpClientResponse::getContent), ratingClient.createGet("http://ratingsservice/" + video.id()) .<Rating>flatMap(HttpClientResponse::getContent), metadataClient.createGet("http://metadataservice/" + video.id()) .<VideoMetadata>flatMap(HttpClientResponse::getContent), (b, r, m) -> combineVideoData(video, b, r, m))) ))); Delivering Netflix! Disclaimer: This is an example and not an exact representation of the processing
-> Catalog::videos) .flatMap(video -> Observable.zip(bookmarkClient.createGet("http://bookmarkservice/" + video.id()) .<Bookmark>flatMap(HttpClientResponse::getContent), ratingClient.createGet("http://ratingsservice/" + video.id()) .<Rating>flatMap(HttpClientResponse::getContent), metadataClient.createGet("http://metadataservice/" + video.id()) .<VideoMetadata>flatMap(HttpClientResponse::getContent), (b, r, m) -> combineVideoData(video, b, r, m))) ))); Delivering Netflix! Disclaimer: This is an example and not an exact representation of the processing
-> Catalog::videos) .flatMap(video -> Observable.zip(bookmarkClient.createGet("http://bookmarkservice/" + video.id()) .<Bookmark>flatMap(HttpClientResponse::getContent), ratingClient.createGet("http://ratingsservice/" + video.id()) .<Rating>flatMap(HttpClientResponse::getContent), metadataClient.createGet("http://metadataservice/" + video.id()) .<VideoMetadata>flatMap(HttpClientResponse::getContent), (b, r, m) -> combineVideoData(video, b, r, m))) ))); Delivering Netflix! Disclaimer: This is an example and not an exact representation of the processing
-> Catalog::videos) .flatMap(video -> Observable.zip(bookmarkClient.createGet("http://bookmarkservice/" + video.id()) .<Bookmark>flatMap(HttpClientResponse::getContent), ratingClient.createGet("http://ratingsservice/" + video.id()) .<Rating>flatMap(HttpClientResponse::getContent), metadataClient.createGet("http://metadataservice/" + video.id()) .<VideoMetadata>flatMap(HttpClientResponse::getContent), (b, r, m) -> combineVideoData(video, b, r, m))) ))); Delivering Netflix! Disclaimer: This is an example and not an exact representation of the processing
-> Catalog::videos) .flatMap(video -> Observable.zip(bookmarkClient.createGet("http://bookmarkservice/" + video.id()) .<Bookmark>flatMap(HttpClientResponse::getContent), ratingClient.createGet("http://ratingsservice/" + video.id()) .<Rating>flatMap(HttpClientResponse::getContent), metadataClient.createGet("http://metadataservice/" + video.id()) .<VideoMetadata>flatMap(HttpClientResponse::getContent), (b, r, m) -> combineVideoData(video, b, r, m))) ))); Delivering Netflix! Disclaimer: This is an example and not an exact representation of the processing
-> Catalog::videos) .flatMap(video -> Observable.zip(bookmarkClient.createGet("http://bookmarkservice/" + video.id()) .<Bookmark>flatMap(HttpClientResponse::getContent), ratingClient.createGet("http://ratingsservice/" + video.id()) .<Rating>flatMap(HttpClientResponse::getContent), metadataClient.createGet("http://metadataservice/" + video.id()) .<VideoMetadata>flatMap(HttpClientResponse::getContent), (b, r, m) -> combineVideoData(video, b, r, m))) ))); Delivering Netflix! Disclaimer: This is an example and not an exact representation of the processing
-> Catalog::videos) .flatMap(video -> Observable.zip(bookmarkClient.createGet("http://bookmarkservice/" + video.id()) .<Bookmark>flatMap(HttpClientResponse::getContent), ratingClient.createGet("http://ratingsservice/" + video.id()) .<Rating>flatMap(HttpClientResponse::getContent), metadataClient.createGet("http://metadataservice/" + video.id()) .<VideoMetadata>flatMap(HttpClientResponse::getContent), (b, r, m) -> combineVideoData(video, b, r, m))) ))); Delivering Netflix! Disclaimer: This is an example and not an exact representation of the processing
Video Metadata Service Observable Bookmarks Service Disclaimer: This is an example and not an exact representation of the processing Observable Observable Observable
Load balancing: https://github.com/Netflix/ocelli Server as a function: http://monkey.org/~marius/funsrv.pdf Fallacies of distributed computing: en.wikipedia.org/wiki/ Fallacies_of_distributed_computing#The_fallacies Nitesh Kant @NiteshKant