Mindblown: a blog about philosophy.
-
Bandwidth cost for EC2/cloud computing
Cloud computing often advertises on the per hour instance cost (like 10 cents per hour). Cheap right? Not necessarily. There are many additional charges (bandwidth, IO, etc. etc.) that can become much much more expensive than the cost of running the instance. Any wise company that want to invest their time in any cloud must…
-
haproxy and stunnel
This quick reference to install haproxy, stunnel to support SSL forwarding (with IP forwarding patch) wget http://haproxy.1wt.eu/download/1.3/src/haproxy-1.3.22.tar.gz tar -zxf haproxy-1.3.22.tar.gz cd haproxy-1.3.22 make TARGET=linux26 cp haproxy /usr/sbin/haproxy vi /etc/haproxy.cfg … vi /etc/init.d/haproxy … chmod +x /etc/init.d/haproxy useradd haproxy mkdir -p /var/chroot/haproxy chown haproxy:haproxy /var/chroot/haproxy chmod 700 /var/chroot/haproxy service haproxy start chkconfig –add haproxy vi /etc/sysconfig/syslog…
-
Install APC automatically via script
If you try to install APC via scripting, you might experience the interactive prompt asking about “apxs”. How to by pass that? Use expect (“yum install expect”). This script will solve your problem: #!/usr/bin/expect spawn pecl install apc expect “Use apxs to set compile flag” send “yes\r” expect “install ok” expect eof
-
Auto Scaling
The idea is really cool and cost efficient. However, actual implementation is not easy as it should be. There are vendors trying to bridge the gap and I believe it will be much easier in the future. Problem at 2AM For many services, usage fluctuates during any day (and also week). For example, we see…
-
PhoneGap fills a gap to the mobile world
Mobile is going wild! Mobile is going to take over! You hear this many many times in the news and I have to agree for the most part. It’s the convenience, the portability, the accessibility, the entertainment, and also the un-productivity that makes mobile devices great. API to bridge web app and native app I…
-
DataTable jQuery Plugin – JavaScript inside a table cell
If the data source is AJAX and the cell has JavaScript, the node is created and assigned directly via nTd.innerHTML=data so any JavaScript code inside the cell won’t get executed. To correct than you need the custom fnRender for that column. fnRender: function (o) { var oTmp = document.createElement(“div”); oTmp.innerHTML = o.aData[5]; // just to…
-
Hadoop vs. MySQL
I just play with Hadoop, HBase, Hive, Pig via Cloudera’s guide (thanks to Cloudera for bringing these packages to CentOS) for a couple days. Cloudera is going in the right direction, targeting the enterprises. Hadoop is definitely on the watch list as it matures. But right now, it’s very technical and would not be suitable…
-
Hive troubleshooting
I am playing with Hadoop and Hive via Cloudera RPMs. The development status is very active, meaning it could be hard to track down the errors or find help with a specific one. Permission of /tmp in HDFS FAILED: Unknown exception : org.apache.hadoop.fs.permission.AccessControlException: Permission denied: user=mathie, access=WRITE, inode=”tmp”:hadoop:supergroup:rwxrwxr-x Solution: You need to turn on full…
-
haproxy vs. LVS (layer 7 vs layer 4 load balancing)
We just deployed our first haproxy load balancer and still running several LVS-TUN load balancers. Even when advertised as a fast and lightweight, it’s comparing with other layer-7 LB, not with layer-4 LB like LVS. Load Average / CPU Usage haproxy still requires much more resource. On the same really basic server (Pentium 3/4 or…
-
Monitor LSI MegaRAID under CentOS
Not very user friendly with documentation but I guess at least it runs! $ wget http://www.lsi.com/DistributionSystem/AssetDocument/support/downloads/megaraid/miscellaneous/linux/1.01.39_Linux_Cli.zip $ unzip 1.01.39_Linux_Cli.zip $ rpm -Uvh MegaCli-1.01.39-0.i386.rpm $ /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a0 Basic Monitor Script #!/bin/sh CONT=”a0″ STATUS=0 MEGACLI=/opt/MegaRAID/MegaCli/MegaCli64 echo -n “Checking RAID status on ” hostname for a in $CONT do NAME=`$MEGACLI -AdpAllInfo -$a |grep “Product Name” | cut…
Got any book recommendations?