Premature optimisation is the root of all evil. If you're building something that will be as big as Twitter, the programming language will be the least of your problems. Figuring out how to scale all of the connected system horizontally, independently, will be more important than whether you chose Node or C# or Java or Python.
Ask HN: Is NodeJS stable enough to build the next Twitter?
21–30 of 60 posts
Re: Ask HN: Is NodeJS stable enough to build the next Twitter?
#22Re: Ask HN: Is NodeJS stable enough to build the next Twitter?
#23The main thing that can cause shit to hit the fan is not properly handling errors. I highly suggest using domains, and that when an error occurs, if you can, that you gracefully exit. If not, then all other requests will just abort and that isn't very user friendly.
You will also want a way to be notified of errors, so you can stay on top of them and fix them right away. I use winston and have the error level set to email me.
If you want to talk in more detail, contact me... address is on my profile.
Re: Ask HN: Is NodeJS stable enough to build the next Twitter?
#24On a side note, if you've already written your entire backend, I'd recommend user testing, then releasing your product (so that you actually have a chance of becoming the `twitter' you so desire) instead of focusing on your particular (seemingly already-decided-upon) tech stack.
Re: Ask HN: Is NodeJS stable enough to build the next Twitter?
#25Re: Ask HN: Is NodeJS stable enough to build the next Twitter?
#26Either case start getting traction, don't over optimize at the start and watch out for memory leaks: there are tiny bits of best practices that you must follow (always consume the response? check. close the request appropriately? check. don't crash the whole node process? check.), some of which not really well documented, that can ruin your day should you get some important press and are not implemented correctly.
Take a look at the issue tracker of the libraries you are going to use, check if there's something that can affect you and perhaps contribute back!
Re: Ask HN: Is NodeJS stable enough to build the next Twitter?
#27I run http://jsonip.com . It's a single node process running on a VPS. It supports more than 10 million requests a day and barely stresses the system. Granted that its a relatively simple app, but it's raw node.js. I can easily scale it in a few simple ways like adding a caching layer and/or load balance a few extra servers. Haven't needed to yet.
Re: Ask HN: Is NodeJS stable enough to build the next Twitter?
#28We're also dealing with servers in 4 different locations and some requests need to be proxied to a central location. With a ~300ms round trip from Singapore to Washington, Node's asynchronous nature has been a win when it comes to handling concurrency in the face of backend latency.
Re: Ask HN: Is NodeJS stable enough to build the next Twitter?
#29I can't really speak for twitter but we use node.js happily at Soundkeep. It works greate for our use case of streaming audio processing. It has come a long way since it started. Obviously it isn't as mature at Ruby/RoR or Python/Django but not nearly as bloated either. The comparison is weak though since it isn't a framework but more of an environment. A lot of people like to think of it in comparison to the big fra…
Re: Ask HN: Is NodeJS stable enough to build the next Twitter?
#30Yes, it is stable enough. BUT, that assumes you know how to write code that will work under various conditions that can and do arise. The main thing that can cause shit to hit the fan is not properly handling errors. I highly suggest using domains, and that when an error occurs, if you can, that you gracefully exit. If not, then all other requests will just abort and that isn't very user friendly. You will also want…