Netflix runs hundreds of multivariate A/B tests a year, many of which help personalize the experience in the UI. This causes an exponential growth in the number of user experiences served to members, with each unique experience resulting in a unique JS/CSS bundle. Pre-publishing millions of permutations to the CDN for each build of each UI simply does not work at Netflix scale. In this session, we discuss how we built, designed, and scaled a brand new Node.js service, Codex. Its sole responsibility is to build personalized JS/CSS bundles on the fly for members as they move through the Netflix user experience. We’ve learned a ton about building a horizontally scalable Node.js microservice using core AWS services. Codex depends on Amazon S3 and Amazon DynamoDB to meet the streaming needs of our 100 million customers.
26. // starting to look like a
// lot of bundles...
var bundles = [
'homeNewSearch.js',
'homeNewSearchIE.js',
'homeOldSearch.js',
'homeOldSearchIE.js',
...
];
4x variations
already!
72. • Polling works because we
are behind CDN
• Understand partition keys
and partition behavior
• Read the limits and best
practices guidesDynamoDB
Caveats
78. Replication has a
lot of caveats.
Amazon S3 can only replicate to one destination.
Amazon S3 can’t replicate transitive objects.
DynamoDB replication isn’t real time.
79. Every AWS Region is wholly independent!
eu-west
us-west
us-east
codex-sdk
106. It dates back all the way to 2010. Back
then, 512 MB was the overall heap limit,
and I guess it was a no-brainer to decide
that no single string could/should be
bigger than the heap ;-) (512 MB =
memory consumption of a UTF-16 string
with length 2^28.) – jmrk Jun 14 at 15:13