Have you ever waited five or more minutes for 1Gb of NPM packages to download just to write three lines of code?
We have. It doesn’t scale.
We built a freemium serverless platform and we wanted to let our users use NPM. We wanted to allow them to use any NPM package, with zero cold start while keeping sane download and deployment times while minding our storage.
Now here’s the engineering challenge: The naive ‘npm install’ approach has several disadvantages. It’s slow, which prolongs deployment time. It keeps the same package over and over again for different users which increases storage usage. It would force us to either have a long cold start if we choose to copy the node_modules when the container starts, or keep dedicated user containers online, which costs a lot.
In this talk, Schachar Levin unveils the solution we implemented to face this challenge and support complex NPM dependencies trees allowing multiple versions support, deduplicating packages, minimizing storage and download time, while making node able to import packages in a new and efficient way.
For more engineering updates and insights:
Follow us on Twitter → / wixeng
Subscribe our monthly newsletter → https://www.wix.engineering/subscribe
Visit our blog → https://www.wix.engineering/blog
Follow our Medium publication → / wix
Listen to our podcast → https://www.wix.engineering/podcast
Watch video How to Instantaneously Install NPM Packages While Supporting Multi-version and Avoiding Duplications online without registration, duration hours minute second in high quality. This video was added by user Wix Engineering Tech Talks 13 August 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 55 once and liked it 1 people.