Trying of LoopBack

I was looking at StrongLoops for a long time. Guys have really one of the best Node developers (and contributors) with most deep knowledges of Node kernel. That’s why I decided to use their products LoopBack and StrongLoop Arc in my new project.

Read More


An amusing fork bomb

Well, I had a script laying as a ./bin/tail which contains:

1
tail -F logs/app.log | ./node_modules/bunyan/bin/bunyan

Usefull thing for looking through pretty logs.
So when I launched it like bin/tail bash looked firstly at current directory (instead of $PATH) and had found the bin directory with executive tail script.

1
2
3
4
5
6
bin/tail: fork: retry: No child processes
fork: retry: Resource temporarily unavailable
# Fatal error in ../src/platform-linux.cc, line 776
# CHECK_EQ(0, result) failed
# Expected: 0
# Found: 11

voilà fork bomb :)


New in 0.12 Cluster

Cluster appeared in 0.8 for supporting multi-threading requesting, allows to load all CPUs on your machine. Master process listens to the port and shares requests to workers throw th OS, wich was detecting what worker is better for loading.

But it turns low performance on high loads, because OS didn’t keep up for workers because of complex balance mechanics.

So now in available 0.12 guys moved balancing to Node, just made it like round-robin.

But as for me, balancing with nginx upstream still better, because it has more optimized environment for receiving requests.