Server modeling with mysql

632 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
632
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Server modeling with mysql

  1. 1. Server Modeling with Mysql charsyam@naver.com
  2. 2. Never Ending Problem
  3. 3. ScalabilityConsistency
  4. 4. Scalability
  5. 5. Problem Client GroupWeb Server Web Server Data Layer
  6. 6. Easy Problem Client Group bottleneckWeb Server Web Server Data Layer
  7. 7. Solution Client GroupWeb Server Web Server Web Server Web Server Scale up Data Layer Scale out Just Add Server
  8. 8. Hard Problem Client GroupWeb Server Web Server bottleneck Data Layer
  9. 9. Incorrect Solution Client GroupWeb Server Web Server Web Server Web Server Bottleneck Harder! Data Layer
  10. 10. Scale up - Solution Client GroupWeb Server Web Server Need Money Data Layer
  11. 11. Scale Out - Solution Client GroupWeb Server Web Server Partitioning Data Layer Data Layer
  12. 12. How to Find Bottleneck
  13. 13. Cpu load Iowait Lognetstat
  14. 14. TestTestTestTest
  15. 15. Consistency
  16. 16. Master-Slave
  17. 17. One Thing
  18. 18. Need 4 Servers for disater Master DBSlave Slave Slave
  19. 19. Need 4 Servers for diaster Master DBService Service Fail Slave Slave Slave
  20. 20. Need 4 Servers for diaster Master DBService Dump New Slave Slave Slave Copy
  21. 21. Need 4 Servers for disater Master DBSlave Slave Slave
  22. 22. Many Person KnowsThis Model
  23. 23. 1 MasterN Slaves
  24. 24. Many Read, Small Write, and No Consistency Write Master DB Async Replication Read Read Slave
  25. 25. Many Read, Small Write, and No Consistency Write ‘Data’ Master DB Before Replication Read’Data’ SlaveRead Past Data
  26. 26. Many Read, Small Write, and No Consistency Write Master DB Read Read Slave
  27. 27. How to Support Consistency?
  28. 28. DistributionTransaction Processing
  29. 29. 2 Phase Commit
  30. 30. Prepare Phase Master DBWriteWrite Slave
  31. 31. Prepare Master DBWriteWrite Slave Commit Master DBCommitCommit Slave
  32. 32. Semi-SyncWith Mysql
  33. 33. Semi-Sync: Send ACK after sending log Write OK Master DB Ack Async Replication Slave
  34. 34. Mysql Cluster
  35. 35. Old Version < 7.1Just Use In-Memory
  36. 36. Over 7.1Use In-Memory Index And Disk Data
  37. 37. Thank you!

×