We are excited to see that the public npm registry has undergone some changes architecturally to increase its availability and performance characteristics. If you are a developer that makes heavy use of npm like we do at StrongLoop, you know that the sporadic outages and slowdowns can cut into your productivity big time. Npm’s flakiness is unfortunately a complaint we hear from time to time from customers.
At the same time you’ve got to respect the folks that are running the npm service at webscale. Because webscale isn’t easy. When thousands of developers depend on a service every day, it can be both a blessing and a curse. Alex Young even wrote down a few tips a while back on how to survive npm downtime. A cool tidbit is that it looks like npmjs.org is about a month away from becoming the largest package repository of any language. Maven Central and RubyGems.org are currently on top, but losing their lead rapidly.
At StrongLoop we’ve decided to join the other members of the community who’ve already done so, and stand up a mirror of our own. Hosting has been generously sponsored by Rackspace and we are making it available to the community and our customers for free. Here’s the details:
What is npm.strongloop.com?
A read-only mirror of registry.npmjs.org suitable for installing packages from.
Why is this a good thing?
Are there already other mirrors?
Yes. For example, http://npmjs.eu/ is a similar read-only mirror hosted in Germany for the purpose of providing faster access for in or near Europe.
Why is ours better?
It isn’t unless you are looking for a mirror in North America instead of Europe. More is better, right? Instructions on how to setup your own abound on the web. Here’s an example to try.
Are there any security issues?
Yes, the same as http://npmjs.eu/ – there are checksums on all packages, but if npmjs.org is down, there’s no way to verify them, and unfortunately that’s the only time you would likely want to use such a mirror.
What commands/code do I need to use to get it to work?
You can point to our mirror using the commands below.
npm --registry http://npm.strongloop.com <COMMAND>
Or set it globally with:
npm config set registry http://npm.strongloop.com
Does this cost anything to use?
No. This is a service we and Rackspace are providing for free to the community and StrongLoop customers.
What is the delay between publishing to npmjs.org and my package being available on this mirror?
Typically less than 90 seconds.
- What’s in the upcoming Node v0.12 release? Big performance optimizations, read Ben Noordhuis’ blog to learn more.
- Watch Bert Belder’s comprehensive video presentation on all the new upcoming features in v0.12
- Ready to develop APIs in Node.js and get them connected to your data? We’ve made it easy to get started either locally or on your favorite cloud, with a simple npm install.