Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Scaling NPM in VMs with Npmserve (plaid.com)
49 points by whockey on April 20, 2016 | hide | past | favorite | 6 comments



Wow! I think it's worth emphasizing that in the given example, the time taken to install all dependencies went from 8m10s to 7.5s. Seems like a huge productivity boon for any teams working with Node.


Is there really no way to get closer to normal performance for networking in Virtual Box?

Also, why not use Linux VPS? Also, take a look at Docker as an alternative to Vagrant/Chef. Also, take a look at pnpm.


Infrastructure guy at Plaid here.

> Is there really no way to get closer to normal performance for networking in Virtual Box?

Unfortunately not! It takes many different tweaks, tunes, and hacks to squeeze performance out of VirtualBox. To make matters worse, NPM as a tool is pretty slow in general -- in fact it's become somewhat of a joke in the community[1]. npmserve solves this by offloading the work to a remote server, so the npm install process becomes as simple as fetching and expanding a tarball.

> Also, why not use Linux VPS?

This is something we may move to if performance becomes an even bigger issue. We use vagrant-aws[2] in our integration testing environment to achieve a similar effect.

> Also, take a look at Docker as an alternative to Vagrant/Chef.

We don't currently use Docker (in this use-case at least). It's definitely an option, though! Using Chef here is pretty handy, insofar as we can use the same infrastructure code we use on production, so our developer environments are as close to production as possible.

> Also, take a look at pnpm.

Nice, this is the first I've heard of this project. We looked at ied[3], but we weren't comfortable moving over to it without also moving our production infrastructure.

    [1]: https://www.npmjs.com/package/nplaym
    [2]: https://github.com/mitchellh/vagrant-aws
    [3]: https://github.com/alexanderGugel/ied


Wouldn't it be easier to commit node_modules to the source control server? Then you don't have to do npm install on build servers.


The problem is checking megabyte after megabyte of the massive dependency trees that everyone is obsessed burdens source control pretty hard.


The root issue is clearly NPM's terrible performance, but it seems to have been exacerbated here by VirtualBox's terrible networking.

Given that you're talking about developer environments, wouldn't it have been simpler to just try a different virtualisation tool like Parallels, VMWare or (if you're on Windows) Hyper-V ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: