标签归档:High Availability

Load balancing and HA for multiple applications with Apache, HAProxy and keepalived

Let’s imagine a situation where, for whatever reason, we have a number of web applications available for users, and we want users to access them using, for example,

https://example.com/appname/

Each application is served by a number of backend servers, so we want some sort of load balancing. Each backend server is not aware of the clustering, and expects requests relative to /, not /appname. Also, SSL connections and caching are needed. The following picture illustrates the situation:

Here is an example of how to implement such a setup using Apache, HAProxy and keepalived. The provided configuration samples refer to the load balancer machine(s). Here’s the logical structure of a load balancer described here:

Apache

继续阅读

Clustering Tomcat Servers with High Availability and Disaster Fallback

There has been a lot of buzz lately on high-availability and clustering. Most developers don’t care and why should they? These features should be transparent to the application architecture and not something of concern to the developers of that application. But knowledge never hurts, so I emerged myself into the world of load balancing, heartbeats and virtual IP addresses. And you know what? Next time we need a infrastructure like this, I can at least sit down with the guys from the infrastructure department and at least know what the hell they are talking about. 继续阅读

DRBD+heartbeat+mysql搭建高可用数据库

DRBD是一种块设备的实现,与heartbeat的搭配,被广泛用于linux下的高可用(HA)方案中,本文是介绍如何在已经含有数据的分区或硬盘上搭建drbdheartbeat高可用的mysql服务。

在对含有数据的分区或硬盘建立drbd高可用的时候,请确认以下三件事。

1,所在分区或硬盘可以扩容,比如使用lvm
2,所在分区或硬盘上的文件系统支持shrinking
3,如果以上两条都不能满足,请使用外部metadata

这里使用的是第一种方法,具体请接着往下看 继续阅读

DRBD:Linux平台下实现高可用方案

DRBD实际上是一种块设备的实现,主要被用于Linux平台下的高可用(HA)方案之中。他是有内核模块和相关程序而组成,通过网络通信来同步镜像整个设备,有点类似于一个网络RAID的功能。也就是说当你将数据写入本地的DRBD设备上的文件系统时,数据会同时被发送到网络中的另外一台主机之上,并以完全相同的形式记录在一个文件系统中(实际上文件系统的创建也是由DRBD的同步来实现的)。本地节点(主机)与远程节点(主机)的数据可以保证实时的同步,并保证IO的一致性。所以当本地节点的主机出现故障时,远程节点的主机上还会保留有一份完全相同的数据,可以继续使用,以达到高可用的目的。

在高可用(HA)解决方案中使用DRBD的功能,可以代替使用一个共享盘阵存储设备。因为数据同时存在于本地主机和远程主机上,在遇到需要切换的时候,远程主机只需要使用它上面的那份备份数据,就可以继续提供服务了。 继续阅读

The Linux-HA User’s Guide

The Linux-HA User’s Guide

Edition 0.9.0

FlorianHaas

LINBITDocumentation Team


Legal Notice

Copyright © 2009-10 LINBIT HA-Solutions GmbH
The text of and illustrations in this document are licensed under a Creative Commons Attribution–Share Alike 3.0 Unported license (“CC-BY-SA”). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/.
In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Abstract
The definitive reference guide for users of the Heartbeat cluster messaging layer, the Linux-HA cluster resource agents, and other clustering building blocks maintained by the Linux-HA project.

继续阅读

High Availability

High Availability

As more and more mission-critical applications move on the Internet, providing highly available services becomes increasingly important. One of the advantages of a clustered system is that it has hardware and software redundancy, because the cluster system consists of a number of independent nodes, and each node runs a copy of operating system and application software. High availability can be achieved by detecting node or daemon failures and reconfiguring the system appropriately, so that the workload can be taken over by the remaining nodes in the cluster. 继续阅读