หน้าเว็บ

แสดงบทความที่มีป้ายกำกับ cluster แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ cluster แสดงบทความทั้งหมด

วันอังคารที่ 20 ตุลาคม พ.ศ. 2552

Introduction to Ultra Monkey

Ultra Monkey: High Availability and Load Balancing Solution for Linux

[Monkey]


Overview

Cluster Network Services
Ultra Monkey is a project to create load balanced and highly available network services. For example a cluster of web servers that appear as a single web server to end-users. The service may be for end-users across the world connected via the internet, or for enterprise users connected via an intranet.


Diagram: Sample Ultra Network

1. An end-user sends a packet to the virtual service
2. Ultra Monkey selects a server and forwards the packet
3. The server replies
4. Ultra Monkey forwards this reply back to the end-user

Flexible
Ultra Monkey makes use of the Linux operating system to provide a flexible solution that can be tailored to a wide range of needs. From small clusters of only two nodes to large systems serving thousands of connections per second.


Open Source Working with Your Network

Use Any Operating System
While the Ultra Monkey software itself runs on Linux, it is able to provide clustering for virtually any network services running on an operating system that can communicate using TCP or UDP. This means almost any operating system, including Windows™, Solaris™ and of course Linux itself.

Supports a Wide Range of Protocols
Ultra Monkey supports a wide range of protocols, with native health checks for: Web, Mail, FTP, News, LDAP and DNS. Other protocols can be suported using a non-native health check or by adding a custom health check.

Open Source
Ultra Monkey is open source. It makes use of software from various open source projects including The Linux Virtual Server and Heartbeat. Members of the Ultra Monkey project actively contribute to the open source projects whose software is used. Horms, the Ultra Monkey project lead, is one of the core members of the development teams for both Heartbeat and The Linux Virtual Server.


Easy to Install and Maintain

Download, Install, Configure, Project Complete!

Supported Distribitions
Ultra Monkey provides binary packages for a selected list of distributions. Source packages are also available. At this time the following distributions are supported:

  • Debian Woody (Stable 3.0)
  • Debian Sid (Unstable/Testing)
  • Fedora Core 1
  • Red Hat Enterprise Linux 3.0
  • Red Hat 9
  • Red Hat 8.0
  • Red Hat 7.3

Updates
The Ultra Monkey team tracks software packages and releases updates for security or other critical bugs. This includes the kernel as Ultra Monkey provides a kernel patched with The Linux Virtual Server and other related patches. Announcements of these updates packages are available in the News Archive.

Documentation
Ultra Monkey also provides concise documentation in English and Japanese to allow system administrators to easily install and configure an Ultra Monkey cluster. The documentation is available online at www.ultramonkey.org and ultramonkey.jp. Ultra Monkey does not however place restrictions on the way that the underlying software and Linux itself is used, allowing users to customise the system to their needs.


Key Features

Download

The current release is Ultra Monkey 3 which has been built and tested on Debian Sarge and Red Hat Enterprise Linux 3.0. It includes comprehensive documentation on the software included, the technologies used and how to configure a highly available and/or load balanced network. more....

The previous release, 2.0.1, is also available, though new deployments are incouraged to use Ultra Monkey 3. more....

Miscellaneous

The history lists all releases of Ultra Monkey.

More Information

For more information please see the Ultra Monkey web site.


Thanks : ultramonkey.org/

วันพฤหัสบดีที่ 20 สิงหาคม พ.ศ. 2552

Linux Cluster style

Linux Cluster style

1. High Availability or Fail-Over Cluster

2. Load balancing Cluster


1. High Availibility (HA) or Fail-Over Cluster

เป็นการทำงานในส่วนของการทำ fail over คือ เมื่อ server ตัวหลักเกิด down ขึ้นมา ตัวรองจะขึ้นมาทำงานแทน ถ้าดูจากรูปก็คือตัว linux director สมมติ server ซ้ายตัวกลางคือ server A ,server ทางขวาตัวกลางคือ server B และ real server( server ข้างล่าง) คือ server ที่ให้บริการในส่วนของ service ต่างๆที่ไม่ต้องการ downtime จากนั้นก็ config ค่าการทำงานใน server A และ B ให้ทั้งสองทำงานแบบ HA คือให้ server A เป็นตัวหลัก server B เป็นตัวรอง ซึ่ง server ทั้งสองตัวจะมีไอพีกลางหนึ่งไอพี เพื่อใช้เป็นตัวกลางระหว่าง server A และ server B



จากรูปเป็นการให้บริการในส่วนของ web server โดยมี virtual ip (ไอพีกลาง) 192.168.1.1/24 คือไอพีที่ server A ซึ่งเป็น server ตัวหลักเป็นใช้งานอยู่ และเปิดการใช้งานในส่วนของ service web server

ส่วน server B ซึ่งเป็น server รองก็ค่อยทำการตรวจสอบว่า server A down หรือไม่ ถ้าserver A down ก็จะทำการ take resource เป็น server หลักและใช้ไอพี 192.168.1.1/24 แทนและเปิดบริการในส่วน service web server ด้วย

ต่อมาถ้า server A up ขึ้นมา สามารถเซ็ตว่าให้ up ขึ้นมาเป็น server หลักหรือไม่ หรือว่าให้รอจนกว่า server B จะ down ลงไปแล้วจึงขึ้นเป็น server หลัก

การนำมาใช้งานเช่นทำ MySQL Server แบบ Fail-Over (เนื่องจาก MySQL ไม่สนับสนุนการใช้งานแบบ SAN/NAS ถ้าต้องการใช้งานแบบ Cluster เต็มรูปแบบ แนะนำ MySQL Cluster ครับ)

Software: RedHat Cluster Suite, Linux High Availability


2. Load balancing Cluster

เป็นการทำงานแบบช่วยกันทำและยังไม่ขึ้นกับ platform ของ server ด้วยเพราะว่าเราจะใช้ linux cluster เป็นตัวจัดการ



server หลักจะมี 4 ไอพี คือ

  • ไอพีของ interface 2 ip
  • ไอพี virtual 2 ip


หลักการ (เหมือน fail over) คือ จะมี server หลัก สมมติเป็น server A นะ จะมีไอพี 192.168.1.1 ,192.168.1.2 ,10.1.1.2 ,10.1.1.1 และจะเปิด port ที่ real server ให้บริการ เพื่อที่จะ forward ไปให้ real server ( ซึ่งอาจมี server ที่ให้บริการ service เดียวกันอยู่มากกว่าหนึ่งตัว ตัวอย่างเช่น มี web server อยู่สองตัวและมีคนเข้ามาใช้งานประมาณ 10 connection server A ก็จะ forword ไปให้ real server ที่ให้บริการ web server ให้มี connection อย่างละ 5 connection/server ( ขึ้นอยู่กับการตั้งค่าด้วย ) ) ส่วน server B ก็จะคอยตรวจสอบว่า server A down หรือไม่ ถ้า down ก็จะ take มาเป็น server หลักแทน

การนำมาใช้งาน เช่่น ทำ Web Server ที่มีการใช้งานสูง (เครื่องเดียวไม่เพียงพอต่อการใช้งาน)

Software: RedHat Cluster Suite, Linux Virtual Server

Thanks : Ezylinux

วันพุธที่ 19 สิงหาคม พ.ศ. 2552

Microsoft Cluster Server ( MSCS )

Microsoft Cluster Server ( MSCS )

MSCS คือโปรแกรม ที่ออกแบบมาใช้ในการทำงานของเครื่อง server ในการใช้งานร่วมกันเพื่อทำงานในลักษณะของการประมวลผลร่วมกัน , การทำ failover เพื่อเพิ่มประสิทธิภาพในการให้บริการ ( High availability ) , การประมวลผลแบบขนานของ High-performance computing ( HPC )

Microsoft มี 3 เทคโนโลยี ที่ใช้สำหรับการทำ Clustering
1. Microsoft Cluster Service ( MSCS )
2. Component Load Balancing ( CLB )
3. Network Load Balancing Services ( NLB )
โดยที่ ใน window Server 2008 จะเป็นที่รู้จักในชื่อของ Failover Clustering

สำหรับ Cluster Server นั้นจะถูกใช้ชื่อว่า "Wolfpack" ในการพัฒนา โดยเริ่มต้นนำไปเป็นส่วนหนึ่งของ Window NT Server จากนั้นก็ค่อยๆ พัฒนาเรื่อยมายัง Window 2000 , Window Server 2003 , Window Server 2008 และต่อมาก็กลายมาเป็น HPC Server

Thanks : Wiki


คราวนี้มาดูกันว่า MS แต่ละยุค มีลักษณะอย่างไรกันบ้างเริ่มด้วย

MS Window 2000 Advance Edition ทำได้แค่ 2 node

MS Window 2003 Standard Edition ทำได้ 4 node ( ถ้าจำไม่ผิด )

MS Window 2003 Enterprise Edition ทำได้ 8 node ( ถ้าจำไม่ผิด )




Microsoft แบ่ง Cluster เป็น 2 แบบเช่นเดียวกับ Linux คือ

1. High Availability ( HA ) หรือ Fail-Over รูปแบบก็คือ เมื่อเครื่องแรกตายลง เครื่องสำรองก็ทำงานแทน โดยการทำงานนี้ต้องให้ซอฟแวร์ที่ทำงานสนับสนุนด้วย เนื่องจากเมื่อเครื่องแรกตายจะมีการย้าย process ที่เครื่องแรกทำงานอยู่มาทำงานที่เครื่องสอง และทำงานต่อไปได้ ซอฟแวร์ที่สนับสนุนเช่น Database : MSSQLServer 2000,2005 Enterprise, Oralce FailSafe, DB2, etc.. Mail : MSExchange 2000,2003 Enterprise, etc.. เป็นต้น


2. Load balanding ส่วนใหญ่จะเอามาใช้กับพวก Server Farm เป็นลักษณะการแบ่งภาระงานและการช่วยกันทำงาน ส่วนใหญ่จะใช้กับ Web Server และ Database

Client : ก็เครื่องที่ end-user ใช้

Server : เครื่องที่ใช้ทำ Cluster มี OS เป็น Window Server 2003 , Window HPC Server

Storage : ในที่นี้ใช้ Fibre เป็นตัวเชื่อม Storage กับ Server


ช่วงนี้เป็นช่วงอธิบายคำศัพท์

  1. Public Network : Network ที่ใช้กันทั่วไปโดยสามารถติดต่อกันได้
  2. Private Network : Network ที่ใช้กันภายในเฉพาะวง Server เท่านั้น
  3. Host Bus Adapter : PCI-Card ที่ทำหน้าที่แปลงสัญญาณแสงเป็นข้อมูล เชื่อมต่อระหว่าง server กับ storage device ( มองเป็น การ์ด Lan )
  4. Fibre Channel Switch : ก็ลักษณะเหมือนกับ LAN Switch
  5. Controller : เป็นส่วนควบคุมการทำงานของ Storage โดย Storage ตัวนึงจะมี controller 2 ใบ
  6. LUN: พื้นที่ที่ได้จากการจัดสรรของ Controller โดยพื้นที่เหล่านี้ได้มาจาก HardDisk ทั้งหลายที่ผ่านการทำ RAID เรียบร้อยแล้ว
  7. SAN: อันนี้แถม Storage Area Network ที่เก็บข้อมูลนั่นแหล่ะ

ใน MSCS นั้นจะเป็นลักษณะของการสร้าง Cluster โดยอาศัย Active Directory ซึ่งถือว่าเป็น key หลักของ Microsoft Server เลยทีเดียว ดังนั้นการจะทำ MSCS ได้ต้องมี Active Directory ก่อนจึงจะทำ MSCS ได้ จากนั้น MSCS จะสร้าง Virtual Server ขึ้นมาตัวนึง โดย Virtual Server ตัวนี้จะมี IP-Address และ Computer Name เหมือนเครื่องทั่วไป ซึ่งสามารถ ping หาที่อยู่ได้จาก ip-address ที่กำหนด ซึ่งในกรณีนี้ Virtual Server จะทำหน้าที่เชื่อมต่อกับ Client โดยให้ Client ชี้ Path ที่จะเชื่อมต่อมายัง Virtual Server นี้

องค์ประกอบของ MSCS สำคัญๆ คือ


- HeartBeat เอาไว้ให้ Cluster คอยตรวจสอบว่า มีเครื่องไหน เป็น หรือ ตาย

- Qumrum Disk เป็นพื้นที่ใช้ในการเก็บ process ของ cluster เพื่อที่จะให้เครื่องที่จะทำงานใช้งานต่อไป

- Cluster Service ไว้ทำ Cluster นี้แหละ


Credit: Ezy || promsook.com