Step-by-step MySQL Clustering Setup Presented by Sean Hull, a business and technology consultant, author & speaker
Cluster Sandbox Setup <ul><li>Download standbox - severalnines.com </li></ul><ul><li>Unpackage sandbox </li></ul><ul><li>D...
MySQL Cluster - What <ul><li>NDB storage engine </li></ul><ul><ul><li>mysqld - ports 3306, 3307 </li></ul></ul><ul><ul><ul...
NDB Cluster Diagram
Management <ul><li>Start </li></ul><ul><ul><li>ndb_mgm -e &quot;all start&quot; </li></ul></ul><ul><li>Stop </li></ul><ul>...
Configuration <ul><li>my.cnf </li></ul><ul><ul><li>ndbcluster </li></ul></ul><ul><ul><li>ndb-connectstring=localhost:1186 ...
Performance <ul><li>Slow performance w/large transactions </li></ul><ul><li>Slow performance of joins </li></ul><ul><li>Sl...
Limitations <ul><li>Db size limited to available memory </li></ul><ul><li>No text or blob datatypes </li></ul><ul><li>No f...
NDB Join Test <ul><li>Create table t - 5000 rows </li></ul><ul><li>Create myisam_a and myisam_b </li></ul><ul><li>Insert 5...
Performance Differences <ul><li>Three different insert times </li></ul><ul><li>Three identical join queries </li></ul><ul>...
Expert Comments <ul><li>Quote from High Performance MySQL </li></ul>
Further Reading - Books <ul><li>High Performance MySQL 2nd Ed. - Schwartz,Zaitsev, Tkachenko, Zawodny, Lentz, Balling - O’...
Further Reading - Web <ul><li>Video: Googly MySQL - Stewart Smith </li></ul><ul><li>Johan Andersson’s Cluster & HA Blog </...
Conclusion <ul><li>Unique take on database clustering </li></ul><ul><li>Consider features/limiations </li></ul><ul><li>Tes...
Questions <ul><li>Cluster w/Master + Slave Replication </li></ul><ul><li>UTF8 & UTF16 issues </li></ul>
Thank You <ul><li>Sean Hull <hullsean@gmail.com> </li></ul><ul><ul><li>Founder, Senior Consultant </li></ul></ul><ul><ul><...
Upcoming SlideShare
Loading in …5
×

Oreilly Webcast Jun17

1,006 views
882 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,006
On SlideShare
0
From Embeds
0
Number of Embeds
67
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Oreilly Webcast Jun17

  1. 1. Step-by-step MySQL Clustering Setup Presented by Sean Hull, a business and technology consultant, author & speaker
  2. 2. Cluster Sandbox Setup <ul><li>Download standbox - severalnines.com </li></ul><ul><li>Unpackage sandbox </li></ul><ul><li>Download cluster mysql distro </li></ul><ul><li>Use dist-tgz.sh to expand cluster distro </li></ul><ul><li>Run bootstrap.sh </li></ul><ul><li>Run start-cluster-initial.sh </li></ul><ul><li>Set PATH variable </li></ul>
  3. 3. MySQL Cluster - What <ul><li>NDB storage engine </li></ul><ul><ul><li>mysqld - ports 3306, 3307 </li></ul></ul><ul><ul><ul><li>Sql servers, private InnoDB & MyISAM tables </li></ul></ul></ul><ul><ul><li>ndbd - port 1186 </li></ul></ul><ul><ul><ul><li>Cluster nodes, port 1186 </li></ul></ul></ul><ul><ul><li>ndb_mgmd </li></ul></ul><ul><ul><ul><li>Monitor cluster nodes, start, stop, read conf </li></ul></ul></ul>
  4. 4. NDB Cluster Diagram
  5. 5. Management <ul><li>Start </li></ul><ul><ul><li>ndb_mgm -e &quot;all start&quot; </li></ul></ul><ul><li>Stop </li></ul><ul><ul><li>ndb_mgm -e &quot;all stop&quot; </li></ul></ul><ul><li>Status </li></ul><ul><ul><li>ndb_mgm -e &quot;all status&quot; </li></ul></ul>
  6. 6. Configuration <ul><li>my.cnf </li></ul><ul><ul><li>ndbcluster </li></ul></ul><ul><ul><li>ndb-connectstring=localhost:1186 </li></ul></ul><ul><li>config.ini </li></ul><ul><ul><li>[NDB_MGMD] </li></ul></ul><ul><ul><ul><li>Id </li></ul></ul></ul><ul><ul><ul><li>PortNumber </li></ul></ul></ul><ul><ul><ul><li>Hostname </li></ul></ul></ul>
  7. 7. Performance <ul><li>Slow performance w/large transactions </li></ul><ul><li>Slow performance of joins </li></ul><ul><li>Slow performance of range scans </li></ul>
  8. 8. Limitations <ul><li>Db size limited to available memory </li></ul><ul><li>No text or blob datatypes </li></ul><ul><li>No fulltext indexes </li></ul><ul><li>No temporary tables </li></ul><ul><li>Only read-committed transactions </li></ul><ul><li>No “durability” of commits (backups!) </li></ul><ul><li>No foreign keys supported </li></ul><ul><li>No deadlock detection </li></ul><ul><li>Reads are locking! </li></ul>
  9. 9. NDB Join Test <ul><li>Create table t - 5000 rows </li></ul><ul><li>Create myisam_a and myisam_b </li></ul><ul><li>Insert 5000 rows in each from t </li></ul><ul><li>Create innodb_a and innodb_b </li></ul><ul><li>Insert 5000 rows in each from t </li></ul><ul><li>Create ndb_a and ndb_b </li></ul><ul><li>Insert 5000 rows in each from t </li></ul>
  10. 10. Performance Differences <ul><li>Three different insert times </li></ul><ul><li>Three identical join queries </li></ul><ul><li>Three different execution times </li></ul>
  11. 11. Expert Comments <ul><li>Quote from High Performance MySQL </li></ul>
  12. 12. Further Reading - Books <ul><li>High Performance MySQL 2nd Ed. - Schwartz,Zaitsev, Tkachenko, Zawodny, Lentz, Balling - O’Reilly </li></ul><ul><li>Pro MySQL - Kruckenberg & Pipes - Apress </li></ul>
  13. 13. Further Reading - Web <ul><li>Video: Googly MySQL - Stewart Smith </li></ul><ul><li>Johan Andersson’s Cluster & HA Blog </li></ul>
  14. 14. Conclusion <ul><li>Unique take on database clustering </li></ul><ul><li>Consider features/limiations </li></ul><ul><li>Test, test & test some more </li></ul><ul><li>Future looks bright for NDB Cluster </li></ul>
  15. 15. Questions <ul><li>Cluster w/Master + Slave Replication </li></ul><ul><li>UTF8 & UTF16 issues </li></ul>
  16. 16. Thank You <ul><li>Sean Hull <hullsean@gmail.com> </li></ul><ul><ul><li>Founder, Senior Consultant </li></ul></ul><ul><ul><li>Heavyweight Internet Group </li></ul></ul><ul><ul><li>www.iheavy.com </li></ul></ul><ul><ul><li>Ph: +1-866-268-9448 </li></ul></ul><ul><ul><li>Blog: www.oracleopensource.com </li></ul></ul><ul><ul><li>www.linkedin.com/in/hullsean </li></ul></ul>

×