SlideShare a Scribd company logo
Server Modeling with Mysql


                charsyam@naver.com
Never
        Ending
   Problem
Scalability
Consistency
Scalability
Problem
                     Client Group

Web Server     Web Server



        Data Layer
Easy Problem
                     Client Group
                      bottleneck
Web Server     Web Server



        Data Layer
Solution
                     Client Group

Web Server     Web Server   Web Server   Web Server

                                       Scale up
        Data Layer
                                      Scale out
                                   Just Add Server
Hard Problem
                     Client Group

Web Server     Web Server

                      bottleneck
        Data Layer
Incorrect Solution
                       Client Group

Web Server     Web Server    Web Server   Web Server

                     Bottleneck Harder!
        Data Layer
Scale up - Solution
                 Client Group

Web Server   Web Server
                                        Need
                                       Money

                          Data Layer
Scale Out - Solution
                     Client Group

Web Server     Web Server      Partitioning

        Data Layer                  Data Layer
How to Find
 Bottleneck
Cpu load
 Iowait
   Log
netstat
Test
Test
Test
Test
Consistency
Master-Slave
One Thing
Need 4 Servers for disater

          Master DB



Slave        Slave           Slave
Need 4 Servers for diaster

                Master DB

Service       Service           Fail

  Slave            Slave           Slave
Need 4 Servers for diaster

                Master DB

Service        Dump             New

  Slave            Slave           Slave
                            Copy
Need 4 Servers for disater

          Master DB



Slave        Slave           Slave
Many
  Person
  Knows
This Model
1 Master
N Slaves
Many Read, Small Write, and No Consistency
    Write

              Master DB
                     Async Replication
     Read


     Read
                 Slave
Many Read, Small Write, and No Consistency
    Write ‘Data’

                    Master DB
                         Before Replication

       Read’Data’

                      Slave
Read Past Data
Many Read, Small Write, and No Consistency
    Write

              Master DB

     Read


     Read
                 Slave
How to Support
 Consistency?
Distribution
Transaction
 Processing
2 Phase Commit
Prepare Phase
             Master DB
Write



Write

               Slave
Prepare
           Master DB
Write



Write

             Slave
         Commit
           Master DB
Commit



Commit

             Slave
Semi-Sync
With Mysql
Semi-Sync: Send ACK after sending log
 Write


   OK      Master DB
           Ack      Async Replication


                 Slave
Mysql Cluster
Old Version < 7.1
Just Use In-Memory
Over 7.1
Use In-Memory Index
   And Disk Data
Thank you!

More Related Content

PDF
Scaling a Web Service
PPTX
How to scale up, out or down in Windows Azure - Webinar
PDF
Seminar : &quot;The Future of MySQL - Roadmap to Success&quot; session MySQL ...
PDF
Scale Fail: How I Learned to Love the Downtime
PDF
How to scale up, out or down in Windows Azure
PDF
Amazon Aurora Let's Talk About Performance
PDF
Aws Elastic Block Storage
PPT
Configuring Apache Servers for Better Web Perormance
Scaling a Web Service
How to scale up, out or down in Windows Azure - Webinar
Seminar : &quot;The Future of MySQL - Roadmap to Success&quot; session MySQL ...
Scale Fail: How I Learned to Love the Downtime
How to scale up, out or down in Windows Azure
Amazon Aurora Let's Talk About Performance
Aws Elastic Block Storage
Configuring Apache Servers for Better Web Perormance

What's hot (12)

PPTX
Scalable Web Architecture and Distributed Systems
PDF
Magento Imagine 2013: Fabrizio Branca - Learning To Fly: How Angry Birds Reac...
 
PPTX
Move to azure
PPTX
Hyper-V Dynamic Memory in Depth
PPTX
What to consider when monitoring microservices
PPTX
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
PPTX
HBase: Extreme makeover
PPTX
Making communication across boundaries simple with Azure Service Bus
PDF
Scalable Web Architectures: Common Patterns and Approaches
PDF
"How to optimize the architecture of your platform" by Julien Simon
PDF
Cdn slides
PDF
Scaling the Rails
Scalable Web Architecture and Distributed Systems
Magento Imagine 2013: Fabrizio Branca - Learning To Fly: How Angry Birds Reac...
 
Move to azure
Hyper-V Dynamic Memory in Depth
What to consider when monitoring microservices
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
HBase: Extreme makeover
Making communication across boundaries simple with Azure Service Bus
Scalable Web Architectures: Common Patterns and Approaches
"How to optimize the architecture of your platform" by Julien Simon
Cdn slides
Scaling the Rails
Ad

Similar to Server modeling with mysql (20)

ZIP
My sql replication advanced techniques presentation
PDF
My S Q L Replication Getting The Most From Slaves
PDF
Advanced MySQL Replication Architectures - Luis Soares
PDF
MySQL高可用
PPTX
ExceptionTail.com - MongoDB and RabbitMQ in action
PDF
System design handwritten notes guidance
PDF
Has MySQL grown up?
PDF
System Design.pdf
PDF
Linux and H/W optimizations for MySQL
PDF
Future Proofing MySQL by Robert Hodges, Continuent
PDF
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
PPTX
Handling Data in Mega Scale Systems
PDF
Drupal Con My Sql Ha 2008 08 29
PDF
What every developer should know about database scalability, PyCon 2010
PDF
Buytaert kris my_sql-pacemaker
PDF
Advanced Deployment
PDF
Mysql features for the enterprise
PPTX
Scaling Systems: Architectures that Grow
PDF
MySQL High Availability Solutions
PDF
Mysqlhacodebits20091203 1260184765-phpapp02
My sql replication advanced techniques presentation
My S Q L Replication Getting The Most From Slaves
Advanced MySQL Replication Architectures - Luis Soares
MySQL高可用
ExceptionTail.com - MongoDB and RabbitMQ in action
System design handwritten notes guidance
Has MySQL grown up?
System Design.pdf
Linux and H/W optimizations for MySQL
Future Proofing MySQL by Robert Hodges, Continuent
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
Handling Data in Mega Scale Systems
Drupal Con My Sql Ha 2008 08 29
What every developer should know about database scalability, PyCon 2010
Buytaert kris my_sql-pacemaker
Advanced Deployment
Mysql features for the enterprise
Scaling Systems: Architectures that Grow
MySQL High Availability Solutions
Mysqlhacodebits20091203 1260184765-phpapp02
Ad

More from DaeMyung Kang (20)

PPTX
Count min sketch
PDF
PDF
Ansible
PDF
Why GUID is needed
PDF
How to use redis well
PPTX
The easiest consistent hashing
PDF
How to name a cache key
PDF
Integration between Filebeat and logstash
PDF
How to build massive service for advance
PDF
Massive service basic
PDF
Data Engineering 101
PDF
How To Become Better Engineer
PPTX
Kafka timestamp offset_final
PPTX
Kafka timestamp offset
PPTX
Data pipeline and data lake
PDF
Redis acl
PDF
Coffee store
PDF
Scalable webservice
PDF
Number system
PDF
webservice scaling for newbie
Count min sketch
Ansible
Why GUID is needed
How to use redis well
The easiest consistent hashing
How to name a cache key
Integration between Filebeat and logstash
How to build massive service for advance
Massive service basic
Data Engineering 101
How To Become Better Engineer
Kafka timestamp offset_final
Kafka timestamp offset
Data pipeline and data lake
Redis acl
Coffee store
Scalable webservice
Number system
webservice scaling for newbie

Server modeling with mysql