How to Build HA/LB LAMP Cluster

June 5, 2009
How to Build HA/Load-Balanced LAMP Cluster

In this article i will tell my experience with building a High-Availability Load Balanced Linux+Apache+PHP+MySQL Cluster using 2 web servers + 2 DB servers.

first of all i would like to say ” Many Thanks Sun Microsystems for the great work and projects you are always donating to FOSS world and my Best wishs”, I used the great virtualization platform VirtualBox or Sun XVM to do the lab for this project.

I advice every one who want to test Clustering or HPC to use VirtualBox get it here it’s very easy to use and its perfomance is the best.

Cluster Description:
This cluster will contain 4 nodes as follows:
- 2 x Apache servers configured as Active/Active load-balanced cluster.
- 2 x MySQL servers configured as Master/Slave with Replication and also as Active/Active Load-Balanced Cluster !!! ;) .

The Distro. used in this project is CentOS and the real project contained a SAN storage with 2TB Disk space divided as 1TB for backup, 400GB for each MySQL Server and 200 GB shared Document Root between Apache web servers and formated as GFS2.

here i would like to say “Many Thanks to the Great Red Hat company, without your great support to FOSS and specially to GNU/Linux there will never be this great HA/Clustering platform.

It’s almost easy to do this project using Conga and/or system-config-cluster utilities, i used these tools to configure the cluster storage only as there’s no need to configure fail-over’d services because the whole cluster will be load-balanced.

the most problematic part is the Piranha and LVS configuration part, till now i can’t configure load-balancing using piranha nor /etc/sysconfig/ha/lvs.conf.

the easiest way for me was configuring every thing from the command line using ipvsadm and iptables then make changes permanent by saving them to /etc/rc.local .

to do this cluster using virtual machines, i did make 2 CentOS virtual machines !!, yes only 2 my laptop can’t run fine with more than 3 VMs ;) .
one will be publicly accessible from WAN which acting as Load-Balancer + router + web server + DB server.
the other will be web server + DB server.

the configuration goes like the following:
- configure Apache on the 2 nodes ( i did configure it on the 2nd node to use an exported NFS DocRoot form node1).
- configure MySQL Replication on the Master (node1) and the slave (node2).
- configure ip_forwarding on 2 nodes.
- configure firewall masquerading and NAT on the first node
- set node1 as the default gateway to node2
- set the virtual IP on node 1 using an alias/virtual network interface or using iproute2
- use ipvsadm to set the virtual server and real servers and load balancing algorithm

you will have to this for Apache and MySQL so you’ll have to have 2 virtual services assigned to one virtual server.

and it’s done ;) now you can use a PC on the WAN of node1 to check the cluster.

I know you’re saying WTF is this shit where’s the configuration and commands :) , it’ll be here soon.

To Be Continued and detailed….

Powered by ScribeFire.


عودة الى التدوين التقني

June 5, 2009
السلام عليكم،
فى البدايه اود التنويه الى انني بإذن الله سوف اقوم بكتابة مقاله على الاقل أسبوعياً تصف إحدى الخبرات التي اكتسبها فى حياتي العمليه مع لينوكس و البرمجيات الحره.
كما اود التنويه الى أن معظم مقالاتي ستكون فى الغالب باللغه الانجليزيه لما لها من طابع تقني متقدم بعض الشيئ ولما تحتويه من مصطلحات و عبارات لا يمكن استساغتها من قبل المتخصصين الا بلغتها الاصليه.
لذا إذا كان لديك عزيزي القارئ اي اعتراض يمكنك ترجمة المقاله وارسالها لي او اضافتها فى تعليق او وضعها فى موقعك الخاص بإسمك إذا شئت و من دون ان تذكر المرجع فليس الهدف من هذه المقالات شهره او هدف شخصي و للجميع الحريه فى التعامل مع محتوى هذا الموقع كما يشاء.
أيضاً اود الإعلان عن افتتاح مجموعة جوجل (البرمجيات الحرة فى الشرق الأوسط و شمال أفريقيا) و التي تضم المهتمين بهذا المجال فى هذه المنطقه و أدعوا جميع المهتمين الإشتراك فيها من خلال هذا الرابط.
تم بحمد الله

Powered by ScribeFire.


Dokeos

October 3, 2007

dokeos Open Source e-Learning

About Dokeos Dokeos is a learning management system used in more than 600 companies and public administrations to manage e-learning and blended learning programmes. Dokeos is also a consulting company helping these organisations run Dokeos, analyse, design develop and organize blended learning programmes. More
Read the complete news item
نظام إدارة محتوى تعليمي و تعليم عن بعد أكثر من رائع مميزات النظام كثيرة و سهولة التعامل معه تجعله من أفضل الانظمة التى قمت بتجربتها حتى انه من وحهة نظري منافس قوي لنظام موودل Moodle الشهير .

Powered by ScribeFire.


I’m Back

October 2, 2007

I’m sorry for being away for about 6 months, and finaly i’m back.

آسف لغيابي طوال هذه الفترة التى تعدت ٦ أشهر و الان قد عدت .


BinToo-2007.3-dvd Now Available at LinuxTracker.org

March 12, 2007

Linuxtracker.org is pleased to announce the availability of BinToo-2007.3-dvd on the linuxtracker bittorrent network. For faster downloads, more accurate statistics and to see all of the available torrents, please visit http://linuxtracker.org.

read more | digg story


OCS Inventory NG

February 15, 2007

OCS Inventory NG

Open Computer and Software Inventory Next Generation is an application designed to help a network or system administrator keep track of computer configuration and software installed on the network. It also allows deploying softwares, commands or files on Windows and Linux client computers.

برنامج لإدارة ممتلكات الشركات و المكاتب من أجهزة الحاسبات و ما يخصها .

powered by performancing firefox


GLPI

February 15, 2007

GLPI – Gestionnaire libre de parc informatique

GLPI is the Information Resource-Manager with an additional Administration- Interface. You can use it to build up a database with an inventory for your company (computer, software, printers…). It has enhanced functions to make the daily life for the administrators easier, like a job-tracking-system with mail-notification and methods to build a database with basic information about your network-topology.

The principal functionalities of the application are :

1) the precise inventory of all the technical resources. All their characteristics will be stored in a database.

2) management and the history of the maintenance actions and the bound procedures. This application is dynamic and is directly connected to the users who can post requests to the technicians. An interface thus authorizes the latter with if required preventing the service of maintenance and indexing a problem encountered with one of the technical resources to which they have access.

برنامج رائع لإدارة ممتلكات الشركات و المكاتب من أجهزة حاسب و عتاده و كل شيئ يخصه .



BinToo-2007.1 Released

January 14, 2007

BinToo GNU/Linux | The fastest way to BINary genTOO

BinToo-2007.1 Released:
I’m pleased to announce the 3rd release of BinToo Distro. BinToo-2007.1 and the new installation method. ** In this release: + New installation method contains 4 profiles for installation:1-Full: which will install the Full BinToo Distro. with its all more than 2400 Packages, this is the recommended profile but note that this will take About 8 hours and requires 12GB free space on the installation drive .

2-Basic Desktop: this profile will install Gnome, KDE, and many useful applications for desktop users, this profile will take about 4 hours and requires 6GB free space on the installation drive.

3-Minimal or Server: this profile will install the basic shell system only plus some server/firewall applications, this profile will take about 1 hour and requires 3GB free space on the installation drive.

4-Custom: this will give you a list of available packages to select what you need from it, this is for advanced linux users.

توزيعة بنتو : هى توزيعة صُنِعت بأيدي عربيه -فى الحقيقة بيداي هاتين :) – موجهة للمستخدم العربي و تدعم اللغه العربيه بشكل جيد كما يمكنك إستخدامها بالواجهة الانجليزيه كباقى توزيعات لينكس الاخرى.
هذه التوزيعة مبنيه على توزيعة جنتو Gentoo و هى توزيعة يتم بناءها من كود المصدر و صعبة بعض الشئ فى بناءها و تحتاج الى وقت طويل جداً قد يصل فى بعض الاحيان الى أسابيع لكى تمكن إستخدامها و تصبح كامله و لكنها سهلة فى الاستخدام و تعتبر من أكفأ التوزيعات .

powered by performancing firefox


FlowPlayer

January 5, 2007

freshmeat.net: Project details for FlowPlayer Screenshot

FlowPlayer is a video player for Flash Video in FLV format. The UI is clean and simple. The player is easy to configure and embed into your home page, site, or blog. The player supports progressive download with HTTP and also streaming with Flash Media Server and Red5.

    أداه يمكن دمجها فى مواقع الانترنت لعرض ملفات الفيديو من النوع FLV او فلاش فيديو – مثل الخاصة بموقع YouTube و جوجل فيديو .

powered by performancing firefox


Stratagus

December 30, 2006

Stratagus | Home

Stratagus Logo

Stratagus is a free cross-platform real-time strategy gaming engine. It includes support for playing over the internet/LAN, or playing a computer opponent. The engine is configurable and can be used to create games with a wide-range of features specific to your needs. See the Games page for a list of current games using the Stratagus engine.

. محرك العاب إستراتيجيه حر و مجانى

powered by performancing firefox