I’ve been fighting with Node.js long enough in production now that I don’t enjoy working with it anymore unfortunately, so at least for now this my formal farewell!
Node does some things well, but ultimately it’s not the right tool for the type of software I’m interested in these days. I still plan on using Node for web sites.
The more I’ve been working with distributed systems, the more I’m frustrated by Node’s direction, which favors performance over usability and robustness. In the past week I’ve rewritten a relatively large distributed system in Go, and it’s robust, performs better, it’s easier to maintain, and has better test coverage since synchronous code is generally nicer and simpler to work with. TJ is not the first high-profile “noder” to leave for Go. A year and a half ago, Felix Geisendoerfer (author of node-mysql and node-formidable, among other well-known npm modules) tweeted: bye #nodejs, hello #golang and #golang is technically better in almost every conceivable aspect Some visible node.js-based start-ups are also making the switch, such as Koding (which provides a web-based development environment): We’re not trying to say nodejs is bad in general. for some use cases it may be awesome. we didn’t feel any of its shortcomings when our codebase was small, when our userbase was smaller than 1000 users. it became bad for us when we had hundred thousand users, and we moved away as quickly as we could.
Go is amazingly stable and awesome. I can’t begin to list why everything about it is just great.
I wrote my first server with it in 2010, when it didn’t even have a proper database library. I wrote Koding’s first command execution server using it’s OS library, it processed at least a billion system commands much better than anything else that was out there.
PopTip helps companies provide a statistical breakdown on public consensus. Its clients include CNN, L’Oreal, Spotify, and a host of others. The size of these customers required PopTip to scale its code. Its service depends on machine learning and streaming data. As the company scaled, the task of administration became increasingly complex, due to “call-back soup”, a common complaint with Node.js.
The switch came when one of PopTip’s engineers spent a weekend replicating the core processing structure with Go. Text processing increased 64 percent just by moving from Node to Go. PopTip formally evaluated Go,and it passed the scorecard test: it had the runtime speed, the cost to administer was minimal, the talent pool was excellent, and competing frameworks were not vying for the attention of the developers.
It’s not just node.js users making the switch. Others are too. One of Python’s most visible users, Dropbox — who also employs Python’s creator Guido van Rossum — recently announced it has migrated major parts of its back-end infrastructure from Python to Go:
Dropbox owes a large share of its success to Python, a language that enabled us to iterate and develop quickly. However, as our infrastructure matures to support our ever growing user base, we started exploring ways to scale our systems in a more efficient manner. About a year ago, we decided to migrate our performance-critical backends from Python to Go to leverage better concurrency support and faster execution speed. This was a massive effort–around 200,000 lines of Go code–undertaken by a small team of engineers. At this point, we have successfully moved major parts of our infrastructure to Go.
And, less surprisingly, Google is also switching projects over:
dl.google.com serves Googles downloads [Chrome, Android SDK, Earth, etc.]
Was written in C++
Now in Go
Now much better [more maintainable]
Naturally, it’s not just existing projects making the switch. New high-profile projects are also started using Go. Most well-known is probably Docker. Many project using Docker under the hood are also written in Go, such as Flynn, a Docker-based PaaS. Go 1.0 was only released 2 years ago. Clearly there’s a lot of momentum to use it for building high-performance web servers now. It’s fast, easy to distribute (because it produces a single statically linked binary) and has good async features without “callback hell.”
Not looking at Go yet? It may be a good time to do so now — everybody else is.