หน้าเว็บ

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

วันอังคารที่ 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/

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

LVS หรือ Linux Virtual Sever อีกทางเลือกหนึ่ง

คงมีหลายท่านที่กำลังมองหา Solution ในการใช้งาน Clustering เพื่อเพิ่มความคงอยู่ได้(high availability ) ของระบบ และการทำ Load Balancing เพื่อกระจายสมดุลภาระงานแก่ระบบ

ก่อนอื่นต้องขอขอบคุณ google และ คุณวิบูลย์ วราสิทธิชัย เจ้าหน้าที่ประจำศูนย์คอมฯ มหาวิทยาลัยสงขลานครินทร์ ที่ได้ให้การสนับสนุนข้อมูลและความรู้ต่าง ๆ

มาเข้าเรื่องกันเลย วันนี้ขอนำเสนอ LVS หรือ Linux Virtual Sever เป็นโครงการที่ทำการศึกษาการสร้างระบบบริการเสมือน (Virtual Server System) ให้สามารถทำงานทางด้านการกระจายภาระและมีความคงทนสูงสำหรับใช้ในเทคโนโลยี คลัสเตอริ่ง (Clustering Technology) เพื่อให้เป็นเครื่องบริการที่ใช้ระบบปฏิบัติการลินุกซ์

โครงการ LVS พัฒนาซอฟต์แวร์เพื่อ
• กระจายสมดุลภาระระดับไอพี (IP Load Balancing Software, IPVS)
• การกระจายภาระตามระดับของแอพลิเคชัน (Application-Level Load Balancing Software, KTCPVS)
• การจัดการคลัสเตอร์

ในที่นี้จะขอกล่างถึง IPVS ซึ่งมีคุณสมบัติกระจายสมดุลภาระระดับไอพี ซึ่งมีหลักการทำงานดังรูป






เมื่อ มองระบบคลัสเตอร์นี้ทั้งระบบ จะเสมือนว่าไคลเอนต์ได้ทำการติดต่อกับเซิร์ฟเวอร์เพียงเครื่องเดียว จึงเรียกระบบนี้ว่า “เซิร์ฟเวอร์เสมือน" (Virtual Server)

โดยมีคุณลักษณะดังนี้
  • ทำงานเป็นเลเยอร์ 4 สวิตชิ่ง (Layer 4 Switching) ที่รองรับโปรโตคอล ทีซีพี (TCP) และยูดีพี (UDP)
  • สามารถกระจายภาระไปยังเรียลเซิร์ฟเวอร์ที่ใช้ระบบปฏิบัติการที่แตกต่างกันได้
  • จะ มีเซิร์ฟเวอร์หนึ่งเครื่องทำหน้าที่รับการร้องขอบริการที่เข้ามาทางหมายเลข ไอพีเสมือน (Virtual IP) จากนั้นจะทำการกระจายสมดุลภาระไปยังเซิร์ฟเวอร์ที่ให้บริการ
  • เรียกเซิร์ฟเวอร์ที่ใช้ในการกระจายภาระนี้ว่า "ไดเรกเตอร์เซิร์ฟเวอร์"(Director Server) หรือลินุกซ์ไดเรกเตอร์ (Linux Director)
  • เรียกเซิร์ฟเวอร์ที่ให้บริการนี้ว่า "เรียลเซิร์ฟเวอร์" (Real Server)

มีรูปแบบการเชื่อมต่ออยู่สามแบบ คือ

1. IPVS via Network Address Translation (IPVS/NAT)



  • ลินุกซ์ไดเรกเตอร์และเรียลเซิร์ฟเวอร์ต่างๆ ที่อยู่ภายในระบบคลัสเตอร์จะทำการเชื่อมต่อกันโดยสวิตช์ (Switch) หรือฮับ (Hub)
  • ใช้เทคนิคเปลี่ยนหมายเลขไอพีและหมายเลขพอร์ตเป็นของเซิร์ฟเวอร์ที่ได้เลือกไว้
  • เซิร์ฟเวอร์ส่งผลลัพธ์กลับไปยังลินุกซ์ไดเรกเตอร์

2. IPVS via Direct Routing (IPVS/DR)



  • ใช้เทคนิคเปลี่ยนฮาร์ดแวร์แอดเดรส(MAC Address) ในเดตาเฟรม (DataFrame) ให้เป็นของเซิร์ฟเวอร์ในคลัสเตอร์ที่ได้เลือกไว้
  • เพิ่มลูปแบ็คอินเทอร์เฟส lo:0 มีหมายเลขไอพีเสมือนที่เซิร์ฟเวอร์ทุกเครื่องในคลัสเตอร์
  • เซิร์ฟเวอร์ส่งผลลัพธ์กลับไปยังไคลเอนต์โดยตรง

3. IPVS via IP Tunneling (IPVS/TUN)




  • ใช้เทคนิคที่ทำการห่อหุ้มไอพีเดตาแกรม(IP Datagram Encapsulate) ภายในไอพีเดตาแกรมอีกทีหนึ่ง
  • เพิ่มอินเตอร์เฟสแบบ Tunnel คือ tunl0 มีหมายเลขไอพีเสมือนที่เซิร์ฟเวอร์ทุกเครื่องในคลัสเตอร์
  • เซิร์ฟเวอร์ส่งผลลัพธ์กลับไปยังไคลเอนต์โดยตรง

ส่วนรูปแบบของ Scheduling Algorithms มีดังต่อไปนี้
  1. Round - Robin (rr)
  2. Least - Connection (lc)
  3. Weighted Least - Connection (wlc)
  4. Destination Hashing (dh)
  5. Source Hashing (sh)
  6. และอื่นๆ

รู้สึกว่าหากลงไปลึกคงจมแน่ๆ ( เมา ) วันนี้ขอพักไว้แค่นี้ก่อน ยังมีการทำงานของ Heartbeat อีกส่วนหนึ่ง
สำหรับข้อมูลในการ ติดตั้งใช้งาน ลองศึกษาจาก เอกสาร นี้
และลองมาดูการประยุกต์ใช้งานของคุณ pphetra : ทำความรู้จัก LVS