I’ve just uploaded the latest .debs to launchpad for nodeJS v0.8 and npm 1.1.32. This should bring you a whole host of fixes and new features. The cluster functionality is far better now and the new module on the block is the domain features which allows you to group multiple IO features and handle them more efficiently. You can grab the latest packages here:
or by running:
apt-get install nodejs npm
I’ve also tested out the node-wwwfier project with the latest version and that’s still running sweetly.
A few times now I’ve run into a situation where I want a site hosted in AWS (amazon web services) and I also want the site to be HA (highly available). The best way to achieve this is to have multiple web servers behind an ELB (elastic load balancer). I’m sure you’ve done the same thing many times too.
Now this can lead to a problem. What if I want my website to be accessible via the address http://mysite.tld ?
Normally this is easy to solve and you would just point the DNS for the @/root record of mysite.tld to an IP address. However ELB’s when scale have a habit of changing IP address when they scale, and you can’t currently attach an Elastic IP to them. Amazon tell you to get round this problem you should use a CNAME in your DNS.
Here lies the problem!
If you are using a subdomain such as http://www.mysite.tld you are fine using a CNAME, but the @/root record call it what you will does not allow you to use a CNAME for it. This by design and is in the RFC for DNS, you can only use an IP address.
So you either take the risk that your ELB wont scale or you end up stuck not being able to access your site via http://mysite.tld.
However! You can now point your @/root domain to a service hosted here on SquareCows that simply rewrites your @/root domain mysite.tld and issues a SEO friendly 301 redirect and sends the user to http://www.mysite.tld. This means you can CNAME your www record to the ELB address but still allow traffic to hit the root domain of your site.
You can use this service hosted by SquareCows by pointing your @/root DNS record to: 188.8.131.52
We’ve tested this service to a very high level and the current version that’s running on our servers can manage 1 million requests a min over the HA servers, but we have a new version to deploy that should be better by a factor of 4!
Alternatively if you have a static IP and wish to run this service yourself head over to git hub and fork the project. Its also open source and licensed under the AGPL v3:
Its written in nodeJS and uses the cluster functions to take advantage of multiple cores. Feel free to commit pull requests!
Just a quick post to announce the availability of a nodeJS PPA repository for Ubuntu 12.04. This PPA currently supports nodeJS 0.6.11 and npm 1.1.1-7 but I’ll be aiming to update as the new stable releases come out. Hopefully this will enable more of you to work with the current stable release of nodeJS instead of the ubuntu/debian default which at the time of writing is on the 0.4.x branch.
You can read more about the repository here:
or easily add the repo by running this from the command prompt:
sudo add-apt-repository ppa:richarvey/nodejs
For those of you wishing to know more about nodejs hop on over to http://nodejs.org