Archive for July, 2008

How to setup Mysql Cluster in Amazon EC2

This is a quick Howto for setting up MySQL cluster using Amazon EC2 instances. I have used 3 small instances (1 mgmt + 2 data nodes) from RightScale’s CentOS 5 public image to test things. I’ve a working cluster using these steps but there’s no guarantee that these steps works for you as well.

Management server for cluster:
Although we can set up management server for cluster in one of the data node but we should have a third node as if one of the two MySQL cluster nodes fails, and the management server is not running, then the data on the two cluster nodes will become inconsistent and if the same node fails which have management server, then we will not be able to create another node or configure cluster.

Optimize and fix Mysql Server, running slow without any load

I got stuck in a weird problem yesterday, where a newly installed MySQL Server was responding slow. I’ve fixed the issue after detecting a small spelling mistake in file which is entirely not related to MySQL at first instance. Here are some tips, if you’re also on the same boat where Server itself doesnt showing any error, but your user’s lodging complaints of being slow.

1. Check MySQL Configurations:

Install and configure ejabberd jabber IM Server

ejabberd, as described in its home page:
” ejabberd is a distributed, fault-tolerant technology that allows the creation of large-scale instant messaging applications.The server can reliably support thousands of simultaneous users on a single node and has been designed to provide exceptional standards of fault tolerance. As an open source technology, based on industry-standards, ejabberd can be used to build bespoke solutions very cost effectively.”

Describing here Instructions I followed to install and configure ejabberd in CentOS 5:

Step 1. Download the current stable version of ejabberd from its official site. While writing this article the stable version was 2.0.6. I’ve download the binary file for 32 bit Linux machine and uncompress it:

SSH Port forwarding from remote to local machine

SSH has a wonderful feature called SSH Port Forwarding, also known as SSH Tunneling, which allows you to establish a secure SSH session and then tunnel arbitrary TCP connections through it. Tunnels can be created at any time, with almost no effort and no programming, which makes them very appealing.

Here I’ll illustrate it using an example. Suppose you have installed and configured Jabber Instant Messaging Server (check out to do that on this site here). You found later that in the Server machine, there’s no GUI available and you need to access its graphical web admin interface. In this case, you can easily forward port from Server machine to your own PC to access the admin interface. You might know that ejabberd (Jabber Server) web admin interface is available on port 5280.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes