Author: Dasun Hegoda


MySQL Load Balancing With HAProxy

Loading balancing is a hot topic when it comes to high availability(HA). You can distribute the workload among server using a load balancer such as HAProxy. Today we are going to take a look at MySQL loading balancing with HAProxy. To load balance at least you should have 2 nodes of MySQL running. If you haven’t got 2 MySQL nodes running refer the previous post on MySQL Master-Master replication.

What’s HAProxy

HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for very high traffic web sites and
powers quite a number of the world’s most visited ones.

Server Setup

Server 1 – Node 1
Hostname: mysql-1
IP: 192.ABC.X.28

Server 2 – Node 2
Hostname: mysql-2
IP: 192.ABC.Y.29

Server 3 – Load Balancer
Hostname: haproxy
IP: 192.ABC.Z.30



Load balancing MySQL with HAProxy

– Read More –

MySQL Master-Master Replication

What’s MySQL Replication

Replication enables data from one MySQL database server (the master) to be replicated to one or more MySQL database servers (the slaves).

So MySQL Master-Master Replication

In other words MySQL replication is the process by which data stored in a database, will be copied to a second server’s database. This is called MySQL master-slave replication. Today I’m going to focus on MySQL master-master replication where it allows data to be copied from either server. In other words perform reads or writes from either server.

 MySQL master-master replication, Image Courtesy :

Image Courtesy :

– Read More –

Remote Login Linux

Remote login with GUI in Linux – VNC

Hey there! How’s it going? Today what we are going to do is remotely connect to a linux machine with a GUI. Better than ssh right? For that we’ll be using VNC.


Virtual Network Computing (VNC). VNC is a graphical desktop sharing system. It uses Remote Frame Buffer protocol (RFB) protocol for the communication. If you are curious about the operation,

“The VNC server is the program on the machine that shares its screen. The server passively allows the client to take control of it. The VNC client (or viewer) is the program that watches, controls, and interacts with the server. The client controls the server.” – Wikipedia

We are using x11vnc as the VNC tool. Package: x11vnc, VNC server to allow remote access to an existing X session. Below is the simplest way to get the job done. Let’s dive in. SSH should be configured before hand.
– Read More –

Soap Request Curl Linux

Let’s make a SOAP request from command line(curl)?

Hellow there folks! These days most of the web services are exposed as REST or SOAP. There could be a chance where you need to make a request from your command line rather than installing a tool such SOAPUI. Tools are really helpful but there are times where you can’t use tools. I’ll be using curl to make the request. if you don’t know about curl it can transfer data using various protocols. If you don’t have curl installed use the below command.


SOAP Request Flow

SOAP request

Image Courtesy :

– Read More –

How to SSH without a password

What’s SSH & SSH Keys

SSH A.K.A Secure Shell is used to make remote connections between computers to execute commands. A username and password is used for the authentication purpose when establishing the connection. If you have a very strong password, it’s almost 100% secure to use SSH since the data transmission is encrypted. But are you comfortable with typing the lengthy password every time you want to SSH? Also every time you type your password, you are sending your password over the network. So anyone who is eavesdropping on your connection will be able to intercept and crack your password. But if you switch to SSH keys you haven’t got anything to worry because your password is never transmitted over the network. Check out image below to get a vivid idea about the concept. So let’s get down to business(happy-face).

SSH Tunneling

Image Courtesy :

– Read More –

Older Posts
Newer Posts