Hosting Without Hoisting: NPM Flattening for Zero Cold Start Serverless

Meetups at Wix
Meetups at Wix
Public group

Online event

This event has passed


// Intro - Corvid for Developers, Series of Meetups

Wix is a website building platform that enables users to build beautiful sites easily, while taking care of everything from HTML and CSS to domains and SSL.

In the last few years, we developed Corvid, a serverless solution on top of Wix sites. It enables developers to build full-fledged web applications. Besides frontend and backend code and data, we feature all the perks a modern developer wants: scheduled tasks, secret manager, distributed logging, and even choosing to develop with your IDE of choice.

Building a serverless platform presented us with unique technological challenges that we will share with you in this series of meetups.

// Hosting Without Hoisting: NPM Flattening for Zero Cold Start Serverless - Schachar Levin

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 will unveil 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.

// Bio
Schachar Levin has worked in the software industry since 1994 and as part of the Wix Corvid backend team for the past four years where he has contributed to Corvid’s ability to run arbitrary backend user code. Prior to Wix, he worked as a software engineer in the fields of Cloud, System, and DevOps. Schachar is an avid diver and Scuba instructor.

// Please notice:

* The meetup will be online and the talk will be in English.
* Link to the event will only be visible to people who RSVP.
* The online meetup will be held on July 28, 16:00, Israel Time Zone, GMT +3:00