SlideShare a Scribd company logo
HAProxy    MySQL HA
     on Amazon EC2




                     @ijin
@ijin
• Michael H. Oshita

•

•        8

•

•
EC2   MySQL HA
EC2         MySQL HA



• MySQL Multi-Master

• Amazon RDS (multi-AZ)
MySQL Master-
      Master (MMM)
                DNS
      Web                  Web

DNS         $                    $
      DB1                  DB2




                      $
                ns agent
Amazon RDS
  (multi-AZ)
Web   $   Web
                $


DB1
      $   DB2
                $
$           $
3   4


        $
HAProxyでMySQL HA on Amazon EC2
HAProxy


•                    TCP/HTTP

• MySQL

•          (Web+HAProxy+DB) x2

• Alex Williams        (http://www.alexwilliams.ca/blog/
    2009/08/10/using-haproxy-for-mysql-failover-and-
    redundancy/)
HAProxyでMySQL HA on Amazon EC2
HAProxyでMySQL HA on Amazon EC2
Web       Web

• DB2        or
                  HAProxy   HAProxy


• HAProxy   DB1
                   DB1       DB2
Web       Web

• DB1        or
                  HAProxy   HAProxy


• HAProxy   DB2
                   DB1       DB2
Web       Web
•

• HAProxy       (DB1)       HAProxy   HAProxy


• read      (           )
                             DB1       DB2
•
    (                    Amazon RDS)

• read

•       DB

•

    • http://github.com/ijin/mysqlcheck

    • http://gist.github.com/560708

More Related Content

HAProxyでMySQL HA on Amazon EC2

  • 1. HAProxy MySQL HA on Amazon EC2 @ijin
  • 2. @ijin • Michael H. Oshita • • 8 • •
  • 3. EC2 MySQL HA
  • 4. EC2 MySQL HA • MySQL Multi-Master • Amazon RDS (multi-AZ)
  • 5. MySQL Master- Master (MMM) DNS Web Web DNS $ $ DB1 DB2 $ ns agent
  • 6. Amazon RDS (multi-AZ) Web $ Web $ DB1 $ DB2 $
  • 7. $ $ 3 4 $
  • 9. HAProxy • TCP/HTTP • MySQL • (Web+HAProxy+DB) x2 • Alex Williams (http://www.alexwilliams.ca/blog/ 2009/08/10/using-haproxy-for-mysql-failover-and- redundancy/)
  • 12. Web Web • DB2 or HAProxy HAProxy • HAProxy DB1 DB1 DB2
  • 13. Web Web • DB1 or HAProxy HAProxy • HAProxy DB2 DB1 DB2
  • 14. Web Web • • HAProxy (DB1) HAProxy HAProxy • read ( ) DB1 DB2
  • 15. ( Amazon RDS) • read • DB • • http://github.com/ijin/mysqlcheck • http://gist.github.com/560708

Editor's Notes