Linux Tutorials on the topic “high-availability”

  • Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Heartbeat On Debian Etch

    Author: Falko TimmeTags: , Comments: 9

    Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Heartbeat On Debian Etch This article explains how to set up a two-node load balancer in an active/passive configuration with HAProxy and heartbeat on Debian Etch. The load balancer sits between the user and two (or more) backend Apache web servers that hold the same content. Not only does the load balancer distribute the requests to the two backend Apache servers, it also checks the health of the backend servers. If one of them is down, all requests will automatically be redirected to the remaining backend server. In addition to that, the two load balancer nodes monitor each other using heartbeat, and if the master fails, the slave becomes the master, which means the users will not notice any disruption of the service. HAProxy is session-aware, which means you can use it with any web application that makes use of sessions (such as forums, shopping carts, etc.).

  • How To Set Up A Loadbalanced High-Availability Apache Cluster

    Author: Falko TimmeTags: , , Comments: 22

    How To Set Up A Loadbalanced High-Availability Apache Cluster This tutorial shows how to set up a two-node Apache web server cluster that provides high-availability. In front of the Apache cluster we create a load balancer that splits up incoming requests between the two Apache nodes. Because we do not want the load balancer to become another "Single Point Of Failure", we must provide high-availability for the load balancer, too. Therefore our load balancer will in fact consist out of two load balancer nodes that monitor each other using heartbeat, and if one load balancer fails, the other takes over silently.

  • Apache: Creating A Session-Aware Loadbalancer Using mod_proxy_balancer (Debian Etch)

    Author: Falko TimmeTags: , , Comments: 3

    Apache: Creating A Session-Aware Loadbalancer Using mod_proxy_balancer (Debian Etch) Since Apache 2.1, a new module called mod_proxy_balancer is available which lets you turn a system that has Apache installed into a loadbalancer. This loadbalancer retrieves requested pages from two or more backend webservers and delivers them to the user's computer. Users get the impression that they deal with just one server (the loadbalancer) when in fact there are multiple systems behind the loadbalancer that process the users' requests. By using a loadbalancer, you can lower the load average on your webservers. One important feature of mod_proxy_balancer is that it can keep track of sessions which means that a single user always deals with the same backend webserver. Most websites are database-driven nowadays with user logins etc., and you'd get weird results if a user logs in on one backend webserver, and then his next request goes to another backend webserver, meaning he'd get logged out again. You can avoid this by using mod_proxy_balancer's session-awareness.

  • How To Set Up Database Replication In MySQL

    Author: Falko TimmeTags: , Comments: 61

    How To Set Up Database Replication In MySQL This tutorial describes how to set up database replication in MySQL. MySQL replication allows you to have an exact copy of a database from a master server on another server (slave), and all updates to the database on the master server are immediately replicated to the database on the slave server so that both databases are in sync. This is not a backup policy because an accidentally issued DELETE command will also be carried out on the slave; but replication can help protect against hardware failures though.

  • How To Set Up A Load-Balanced MySQL Cluster

    Author: Falko TimmeTags: , Comments: 23

    How To Set Up A Load-Balanced MySQL Cluster This tutorial shows how to configure a MySQL 5 cluster with three nodes: two storage nodes and one management node. This cluster is load-balanced by a high-availability load balancer that in fact has two nodes that use the Ultra Monkey package which provides heartbeat (for checking if the other node is still alive) and ldirectord (to split up the requests to the nodes of the MySQL cluster).

  • How To Back Up MySQL Databases Without Interrupting MySQL

    Author: Falko TimmeTags: , , Comments: 10

    How To Back Up MySQL Databases Without Interrupting MySQL This article describes how you can back up MySQL databases without interrupting the MySQL service. Normally, when you want to create a MySQL backup, you either have to stop MySQL or issue a read lock on your MySQL tables in order to get a correct backup; if you don't do it this way, you can end up with an inconsistent backup. To get consistent backups without interrupting MySQL, I use a little trick: I replicate my MySQL database to a second MySQL server, and on the second MySQL server I use a cron job that creates regular backups of the replicated database.

  • Setting Up Master-Master Replication With MySQL 5 On Debian Etch

    debian Author: Falko TimmeTags: , , Comments: 6

    Setting Up Master-Master Replication With MySQL 5 On Debian Etch Since version 5, MySQL comes with built-in support for master-master replication, solving the problem that can happen with self-generated keys. In former MySQL versions, the problem with master-master replication was that conflicts arose immediately if node A and node B both inserted an auto-incrementing key on the same table. The advantages of master-master replication over the traditional master-slave replication are that you don't have to modify your applications to make write accesses only to the master, and that it is easier to provide high-availability because if the master fails, you still have the other master.

  • Merging Multiple Apache Access Logs Into One Overall Access Log

    Author: Falko TimmeTags: , , , Comments: 3

    Merging Multiple Apache Access Logs Into One Overall Access Log Let's assume you have a web application that runs of a cluster of Apache nodes. Each node generates its own Apache access log from which you can generate page view statistics with tools such as Webalizer or AWStats. Obviously you do not want to have page view statistics for each Apache node, but overall page view statistics. To achieve this, we must merge the access logs from each node into one overall access log that we can then feed into Webalizer or AWstats. There is a Perl script called logresolvemerge.pl (part of the AWStats package) that can do this for us.