high availability through virtualization
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
High Availability through High Availability through VirtualizationVirtualization
Is RAID enough?Is RAID enough?
Tomas FlorianTomas Florian
FlorienFlorien
ConsultingConsulting
Linux serversLinux servers
Windows workstation Windows workstation interoperabilityinteroperability
VPNs / Remote VPNs / Remote accessaccess
.NET development.NET development
SummarySummary
High AvailabilityHigh Availability DRBDDRBD FailoverFailover HeartbeatHeartbeat
VirtualizationVirtualization Xen vs VMWareXen vs VMWare Xen architectureXen architecture
HA + VirtualizationHA + Virtualization
QuestionsQuestions
High Availability : HAHigh Availability : HA
Linux-ha.org projectLinux-ha.org project
Graceful degradationGraceful degradation
Better than:
ChallengesChallenges
Replicate data Replicate data DRBD Network RAID-1DRBD Network RAID-1
FailoverFailover Take over responsibilities from the dead peersTake over responsibilities from the dead peers
Automatically detect failureAutomatically detect failure HeartbeatHeartbeat
node1 node2
Replicate Data: DRBD Replicate Data: DRBD
DDistributed istributed RReplicated eplicated BBlock lock DDeviceeviceNetwork RAID-1Network RAID-1One active drive (primary)One active drive (primary)N spare drives replicated on the network in N spare drives replicated on the network in real-timereal-timeIn case of primary HD failure, switch to In case of primary HD failure, switch to one of the available secondary drives one of the available secondary drives Mount just like any other block device Mount just like any other block device mount /dev/drbd0 /datamount /dev/drbd0 /data
Failover : haresourcesFailover : haresources
node1 running Apachenode1 running Apache
node2 running qmailnode2 running qmail
node1 dies … apache dies. Node 2:node1 dies … apache dies. Node 2: Take over primary use of DRBD deviceTake over primary use of DRBD device Take over IPTake over IP Take over ApacheTake over Apache
Detect Failure: heartbeatDetect Failure: heartbeatPing through ethernetPing through ethernetSplit brainSplit brain
Ping through serial cable + ethernet Ping through serial cable + ethernet STONITH – Shoot The Other Node In The HeadSTONITH – Shoot The Other Node In The Head
.. node1 is dead .. Time to takeover
.. node2 is dead .. Time to takeover
node1 node2
ExampleExample
Apache qmail
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
ExampleExample
Apache qmail
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
Dead resources
ExampleExample
Apache qmail
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
Dead resources
ExampleExample
Apache qmail
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
Dead resources
ExampleExample
Apache qmail
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
Dead resources
ExampleExample
Apache qmail
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
Dead resources
ExampleExample
Apache qmail
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
Dead resources
ExampleExample
Apache
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
Named mysql qmail
SummarySummary
High AvailabilityHigh Availability DRBDDRBD FailoverFailover HeartbeatHeartbeat
VirtualizationVirtualization Xen vs VMWareXen vs VMWare Xen architectureXen architecture
HA + VirtualizationHA + Virtualization
QuestionsQuestions
XenXen
Pronounced ‘Zen’Pronounced ‘Zen’
Open SourceOpen Source
Run multiple virtual machines on one Run multiple virtual machines on one physical machinephysical machine
Like VMWare but different (better)Like VMWare but different (better)
Xen ArchitectureXen Architecture
Setting up XenSetting up Xen
Install xen software on any LinuxInstall xen software on any LinuxPatch Domain-0 kernelPatch Domain-0 kernelBoot to the new Domain-0 kernelBoot to the new Domain-0 kernelDeploy Domain-U virtual machines Deploy Domain-U virtual machines Allocate diskAllocate disk Deploy any distribution with a patched Deploy any distribution with a patched
Domain-U kernelDomain-U kernel
……Or use a distribution that does this for Or use a distribution that does this for you you
Full Virtualization vs Full Virtualization vs ParavirtualizationParavirtualization
Paravirtualization Paravirtualization Needs kernel patchNeeds kernel patch Open source guest OS only (MS will not let Open source guest OS only (MS will not let
you patch Windows kernel)you patch Windows kernel)
Full virtualization Full virtualization Hypervisor implemented with VT CPUsHypervisor implemented with VT CPUs Windows on Xen possibleWindows on Xen possible
VT hardwareVT hardware
IntelIntel Vanderpool technologyVanderpool technology Intel Pentium DIntel Pentium D Intel Core DuoIntel Core Duo
AMDAMD PacificaPacifica
Check that your BIOS also supports VTCheck that your BIOS also supports VT
VT support in XenVT support in Xen
2.0.7 stable as a rock (but no VT)2.0.7 stable as a rock (but no VT)
3.0.2 unstable (VT… almost)3.0.2 unstable (VT… almost) People regularly report success running People regularly report success running
Windows guests …Windows guests … … … and crashesand crashes
Once v3 becomes stable it will be Once v3 becomes stable it will be unstoppableunstoppable
SummarySummary
High AvailabilityHigh Availability DRBDDRBD FailoverFailover HeartbeatHeartbeat
VirtualizationVirtualization Xen vs VMWareXen vs VMWare Xen architectureXen architecture
HA + VirtualizationHA + Virtualization
QuestionsQuestions
No virtualization…No virtualization…
Apache qmail
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
MySQL
named
samba
……with virtualizationwith virtualization
Web server
Mail server
drbd0 drbd1 drbd0 drbd1
node1 node2
Active resources
Backup resources
Apache
MySQL
named
qmail
named
GainsGains
Whole filesystem protectionWhole filesystem protection / … not just /data/ … not just /data
Simplified managementSimplified management Manage failover for few machines rather than tens of Manage failover for few machines rather than tens of
servicesservices No complicated syncing of updates or configuration No complicated syncing of updates or configuration
on the nodeson the nodes
Security: Security: If one service is hacked, only one VM is compromisedIf one service is hacked, only one VM is compromised
Pit fallsPit falls
PerformancePerformance Running VMs more resource intensive than Running VMs more resource intensive than
running daemonsrunning daemons
Watch out for:Watch out for: Virtual Memory thrashingVirtual Memory thrashing DRBD sync speed DRBD sync speed HD performanceHD performance … … going overboard going overboard
Don’t forget to backupDon’t forget to backup
ResourcesResources
Linux High Availability ProjectLinux High Availability Project Linux-ha.orgLinux-ha.org
Xen web siteXen web site Google search for “xen”Google search for “xen”
Xen DistributionsXen Distributions SuSESuSE FC5 FC5 Xen Live CDXen Live CD … … or just compile on any 2.4.x - 2.6.x kernelor just compile on any 2.4.x - 2.6.x kernel
Paid supportPaid support www.florien.cawww.florien.ca
SummarySummary
High AvailabilityHigh Availability DRBDDRBD FailoverFailover HeartbeatHeartbeat
VirtualizationVirtualization Xen vs VMWareXen vs VMWare Xen architectureXen architecture
HA + VirtualizationHA + Virtualization
QuestionsQuestions
QuestionsQuestions