Monthly Archives: November 2006

(PHP code) Gracefully handling the failure of TCP resources

function check_tcp_active($host, $port) { $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array( “sec”=>0, “usec”=>500 ) ); $result = @socket_connect($socket, $host, $port); if ( $result ) { socket_close($socket); return(TRUE); } else { return(FALSE); } } function find_active_server($array) { // Format: $array['127.0.0.1']=3306 if ( is_array($array) ) { foreach ( $array as $host => $port ) { [...]

EC2 Economics, People just don’t seem to get it

Should you or shouldn’t you use Amazons EC2 service? If you believe everything you read without bothering to send it through the hype filter the answer is invariably YES! But in reality (where most of the rest of us live) the question actually depends on a lot of different factors. The, theoretically, most straight forward [...]

So my little brother got fired…

So my little brother had a job working for a storage company. He had only held the job for about 2 weeks, and last Wed he was fired (no reason given). They failed to have his check ready that day; furthermore they failed to have gotten it to him today. They heartily promise to have [...]

One year aniversary

Well tomorrow is my 1 year anniversary. Thats 1 year happily bickering… er… married It’s been a very trying year (not between her and myself, but between us and life.) Heres to another year with, hopefully, less complications. I love you my sweet! DK

Oh sweet jeebus! Home and End working properly in TextEdit on OSX

Thank you http://www.starryhope.com/tech/2006/mac-os-x-home-and-end-keys/!

Once more into the spam filter

I was getting the following error when running “/usr/bin/sudo -u vpopmail -H /usr/bin/spamassassin -D bayes –lint”, per the instructions: [6932] info: rules: meta test DIGEST_MULTIPLE has undefined dependency ‘RAZOR2_CHECK’ [6932] info: rules: meta test DIGEST_MULTIPLE has undefined dependency ‘DCC_CHECK’ So, after some digging around I wandered over to /usr/share/spamassassin/20_net_tests.cf and set “meta DIGEST_MULTIPLE” to “PYZOR_CHECK [...]

HA EC2 Part #3: What Happens Once You’re Inside the Cloud

Onto what happens inside the cloud! Since we’re looking to load balance what happens inside the cloud you might be tempted to ask why not use the same sort of method we used for load balancing (well at least fail-over) outside the cloud. And the answer is a resounding YOU CAN! But Rather like a [...]

HA EC2 Part #2: Load Balancing the Load Balancer

Lets first address the problem of the dynamic IP address on the load balancer, because it doesn’t matter how good your EC2-side setup is if your clients can no longer reach your load balancer after a reboot. Also complicated because normally you want two load balancers to act as a fail-over pair in case one [...]

HA EC2 Part #1: Identifying the Challenges

I was recently asked to look into load balancing web servers on the Amazon Elastic Cloud Computing Service (EC2). And managing this presents some very interesting problems which need to be worked around. To look at the subject I’ll break it into 3 distinct pieces. #1: Identifying the Challenges (Which you’re currently reading), #2: Load [...]

Fighting the good fight

Out comes my Knoppix 5 DVD, and into the machine I feed it. The local ntfs partition is mounted automagically. I mount my network samba share. Copy between the two… All my “stuff” which needs backing up before this machine can be memory wiped in a way that would make the creaters of the show [...]