MySql Database Replication

When we search for `Database Replication` we will find lots of tutorials, so here I wont add new one, I am just highlighting one of the best tutorials to refer. http://www.howtoforge.com/mysql_database_replication This article contains simple copy & paste steps to configure MySql replication, if you need more detailed indepth explanation on different configuration settings then go to http://dev.mysql.com/doc/refman/5.0/en/replication.html

MySQL Stress Test tool

Recently we moved a client from virtual host to amazon ec2 3 tier architecture then we thought of providing benchmark test report to show the Improvement, then we searched for simple straight forward tools, but we haven`t found, then I started to write a java code to benchmark by stressing mysql server. It performed well, so being a fan of open source, thought of releasing that code and uploaded it to google code. Here is the link Downloadable binary is not yet posted you need to compile it from source code

Read the rest of this post »

Script to start a instance in amazon ec2

This script is used to start a instance in ec2, you can extended this script in the way you want, we keep on posting new scripts to work with ec2

#!/bin/bash

export EC2_HOME=/home/sandeep/ec2/ec2-api-tools-1.3-46266
PATH=$EC2_HOME/bin:$PATH
export EC2_PRIVATE_KEY=/home/sandeep/ec2/pk-XXXXXXXXXXXXXXXXXXXXXXXX.pem
export EC2_CERT=/home/sandeep/ec2/cert-XXXXXXXXXXXXXXXXXXXXXXXX.pem
export EC2_URL=https://us-east-1.ec2.amazonaws.com
export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre/

export amiid="ami-0d5db264"
export key="xxxxsshkeyxxxx"
export zone="us-east-1d"
export id_file="/home/sandeep/ec2/keyxxx.pem"
export group="default"

#
# Start the instance
#
echo Launching AMI ${amiid}
${EC2_HOME}/bin/ec2-run-instances ${amiid} -z ${zone}
                         -k ${key} --group ${group}  > /tmp/a
if [ $? != 0 ]; then
   echo "Error starting instance for image" ${amiid}
   exit 1
fi
export iid=`cat /tmp/a | grep INSTANCE | cut -f2`

#
# Loop until the status changes to 'running'
#
sleep 30
echo Starting instance ${iid}
export RUNNING="running"
export done="false"
while [ $done == "false" ]
do
   export status=`${EC2_HOME}/bin/ec2-describe-instances ${iid} | grep INSTANCE | cut -f6`
   if [ $status == ${RUNNING} ]; then
      export done="true"
   else
      echo Waiting...
      sleep 10
   fi
done
echo Instance ${iid} is running

Please feel free to post any comments or errors XX

 

Page level caching using nginx

Many of our dynamic sites contain rarely updated content (ex. blog archive page). By adding nginx server as proxy server infront of your apache server you can server those pages like static pages instead of running the page for every request, this will boost your site speed from 50% - 400%. We need apache, nginx to work with this tutorial To install nginx on debian please follow this link http://timothybowler.com/2009/11/25/compiling-nginx-on-debian-lenny/ Note: Dont install using aptitude it contains older version where gzip and proxy module not available, Modify apache ports.conf to run apache on port 8080 Add this lines to default site of nginx [shell]

server { listen 80; server_name debianzone.com; location / { proxy_pass http://debianzone.com:8080; proxy_cache debianzone-cache; proxy_cache_valid 200 302 60m; proxy_cache_valid 404 1m; } } [/shell] Add this in http section of nginx.conf[shell] http { proxy_cache_path /var/www/cache levels=1:2 keys_zone=debianzone-cache:8m max_size=1000m inactive=600m; proxy_temp_path /var/www/cache/tmp; }

[/shell]

Chrome released for debian distros

Finally google released chrome browser for debian based distros. After running for hours i feel its stable and working fine Download Google chrome for Debian For developers it has developer tools which looks like firebug, but it`s not so power full like firebug, to open developer tools click
ctrl + shift + i
It also supports extensions and themes At present i can say it as just an alternate browser, but not total replacement for firefox, let me test the stability of chrome for some more time
Media_httpimgzemantac_chagp

RAID and LVM on Amazon EC2 (part I)

This is the first part of three articles I'm posting for a great storage solution using RAID, LVM and Amazon Elastic Block Store (EBS). First, you need to choose your RAID implementation. Personally, I prefer to use RAID 5 on Amazon EC2, combined with LVM2. For setting a RAID 5 up and running you will need to raise at least 3 EBS volumes and attach them to your instance (let’s say: sdb1, sdb2, sbd3).

Read the rest of this post »

Porting Debian to Amazon EC2 for HPC

Few months ago, I was challenged to build a High Performance Computing (HPC) instance on Amazon EC2 and the first thing that came in my mind was: which Linux distribution would fit on such requirements. I must confess I'm pretty much adept to Debian, but I was forced to be unbiased and start researching for better options for achieving my goal. Also because the environment I was going to port was already running Debian, but the application's traffic growth was increasing at high speed and it seemed something was going on with that server.

Read the rest of this post »

Tools to monitor linux apache server

The following tools are usefull to linux administration and monitoring RRDTool: RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data. Use it to write your custom monitoring shell scripts or create whole applications using its Perl, Python, Ruby, TCL or PHP bindings.
Media_httpossoetikerc_kmfwv

Read the rest of this post »