High Availability through Virtualization
Download
Report
Transcript High Availability through Virtualization
High Availability through
Virtualization
Is RAID enough?
Tomas Florian
Florien
Consulting
Linux servers
Windows workstation
interoperability
VPNs / Remote
access
.NET development
Summary
High Availability
DRBD
Failover
Heartbeat
Virtualization
Xen vs VMWare
Xen architecture
HA + Virtualization
Questions
High Availability : HA
Linux-ha.org project
Graceful degradation
Better than:
Challenges
node1
node2
Replicate data
DRBD Network RAID-1
Failover
Take over responsibilities from the dead peers
Automatically detect failure
Heartbeat
Replicate Data: DRBD
Distributed Replicated Block Device
Network RAID-1
One active drive (primary)
N spare drives replicated on the network in
real-time
In case of primary HD failure, switch to
one of the available secondary drives
Mount just like any other block device
mount /dev/drbd0 /data
Failover : haresources
node1 running Apache
node2 running qmail
node1 dies … apache dies. Node 2:
Take over primary use of DRBD device
Take over IP
Take over Apache
Detect Failure: heartbeat
Ping through ethernet
Split brain
.. node2 is dead
.. Time to
takeover
.. node1 is dead
.. Time to
takeover
node1
node2
Ping through serial cable + ethernet
STONITH – Shoot The Other Node In The Head
Example
Apache
drbd0
qmail
drbd1
drbd0
node1
node2
Active resources
Backup resources
drbd1
Example
Apache
drbd0
qmail
drbd1
drbd0
node1
node2
Active resources
Backup resources
Dead resources
drbd1
Example
Apache
drbd0
qmail
drbd1
drbd0
node1
node2
Active resources
Backup resources
Dead resources
drbd1
Example
Apache
drbd0
qmail
drbd1
drbd0
node1
node2
Active resources
Backup resources
Dead resources
drbd1
Example
drbd0
drbd1
node1
Apache
qmail
drbd0
drbd1
node2
Active resources
Backup resources
Dead resources
Example
drbd0
drbd1
node1
Apache
qmail
drbd0
drbd1
node2
Active resources
Backup resources
Dead resources
Example
drbd0
drbd1
node1
Apache
qmail
drbd0
drbd1
node2
Active resources
Backup resources
Dead resources
Example
Apache
Named
drbd0
mysql
drbd1
drbd0
node1
node2
Active resources
Backup resources
qmail
drbd1
Summary
High Availability
DRBD
Failover
Heartbeat
Virtualization
Xen vs VMWare
Xen architecture
HA + Virtualization
Questions
Xen
Pronounced ‘Zen’
Open Source
Run multiple virtual machines on one
physical machine
Like VMWare but different (better)
Xen Architecture
Setting up Xen
Install xen software on any Linux
Patch Domain-0 kernel
Boot to the new Domain-0 kernel
Deploy Domain-U virtual machines
Allocate disk
Deploy any distribution with a patched
Domain-U kernel
…Or use a distribution that does this for
you
Full Virtualization vs
Paravirtualization
Paravirtualization
Needs kernel patch
Open source guest OS only (MS will not let
you patch Windows kernel)
Full virtualization
Hypervisor implemented with VT CPUs
Windows on Xen possible
VT hardware
Intel
Vanderpool technology
Intel Pentium D
Intel Core Duo
AMD
Pacifica
Check that your BIOS also supports VT
VT support in Xen
2.0.7 stable as a rock (but no VT)
3.0.2 unstable (VT… almost)
People regularly report success running
Windows guests …
… and crashes
Once v3 becomes stable it will be
unstoppable
Summary
High Availability
DRBD
Failover
Heartbeat
Virtualization
Xen vs VMWare
Xen architecture
HA + Virtualization
Questions
No virtualization…
MySQL
samba
named
Apache
drbd0
qmail
drbd1
drbd0
node1
node2
Active resources
Backup resources
drbd1
…with virtualization
Web
server
Mail
server
Apache
qmail
MySQL
named
named
drbd0
drbd1
drbd0
node1
node2
Active resources
Backup resources
drbd1
Gains
Whole filesystem protection
/ … not just /data
Simplified management
Manage failover for few machines rather than tens of
services
No complicated syncing of updates or configuration
on the nodes
Security:
If one service is hacked, only one VM is compromised
Pit falls
Performance
Running VMs more resource intensive than
running daemons
Watch out for:
Virtual Memory thrashing
DRBD sync speed
HD performance
… going overboard
Don’t forget to backup
Resources
Linux High Availability Project
Linux-ha.org
Xen web site
Google search for “xen”
Xen Distributions
SuSE
FC5
Xen Live CD
… or just compile on any 2.4.x - 2.6.x kernel
Paid support
www.florien.ca
Summary
High Availability
DRBD
Failover
Heartbeat
Virtualization
Xen vs VMWare
Xen architecture
HA + Virtualization
Questions
Questions