geographically dispersed percona xtradb cluster deployment
play

Geographically Dispersed Percona XtraDB Cluster Deployment Marco - PowerPoint PPT Presentation

Geographically Dispersed Percona XtraDB Cluster Deployment Marco (the Grinch) Tusa September 2017 Dublin About me Marco The Grinch Open source enthusiast Percona consulting Team Leader 2 Agenda What is PXC When nodes


  1. Geographically Dispersed Percona XtraDB Cluster Deployment Marco (the Grinch) Tusa September 2017 Dublin

  2. About me Marco “The Grinch” • Open source enthusiast • Percona consulting Team Leader 2

  3. Agenda • What is PXC • When nodes interacts • Let us clarify, geo dispersed- What to keep in mind then • How to measure latency correctly • Use the right way (sync/async) • Use help like replication manager 3

  4. What is PXC/Galera? (Virtually) Synchronous Replication: True multi-master • Web traffic No slave lag • Balancer No master-slave failover or VIP • Multi-threaded applayers • Automatic node provisioning • Elastic scale (in – out) • Geographic distributed (with segments) • Mix with Async replication • Galera 4

  5. What PXC/Galera is NOT? Not Write-scalable solution Not great for a high amount of parallel, Web traffic small requests Balancer Not great for working with Foreign Keys Not good for sharding Data (each node has the entire dataset) Galera 5

  6. What is a Node • Galera MySQL Replication Standard MySQL Replication Node Master 9cba28fa-a8be-11e4-8f41-9f963e1dbf4f Slave Slave Node Node 6

  7. Segments A segment is a logical grouping of nodes. Replication between Segment is optimized ( writeset - some level of communication ) Traffic and messaging is reduced In case of SST, the donor is chosen by proximity 7

  8. More nodes more problems Use a two phase commit, or distributed locking with capacity formula: m = n x o x t (where messages/sec = number of nodes due to process o number of operation with t transaction throughput) 8

  9. When nodes interacts • Keepalive and checks for cluster health • Writeset on writer commit • Certification results • Ack on local apply • Flow Control • IST/SST 9

  10. Let us clarify, geo dispersed 1 Geo dispersed or multi-site, cluster is a cluster configuration used to help ensure high system and application availability in the event of site disaster. In this configuration, servers are separated geographically and the physical storage (quorum diskor) DATA is synchronously replicated between sites . 
 (http://www.expertglossary.com/storage/definition/geo-dispersed-cluster) 10

  11. Let us clarify, geo dispersed 2 For some environments, latency is the sole focus of performance. As an example of latency, shows a network transfer, such as an HTTP GET request, with the time split into latency and data transfer components. 11

  12. Geo dispersed Geo dispersed is determinate by the latency existing between nodes NOT by the geographic location itself. 12

  13. How to measure latency correctly 1 • wsrep_evs_repl_latency 
 ( It measures latency from the time point when a message is sent out to the time point when a message is received. ) wsrep_replicated/wsrep_replicated • • netperf 13

  14. How to measure latency correctly 2 14

  15. How to measure latency correctly 2 PING 14

  16. How to measure latency correctly 2 PING 14

  17. How to measure latency correctly 2 Why? 14

  18. Brief digression Ref: https://goo.gl/kDTYnW 15

  19. Brief digression Ref: https://goo.gl/kDTYnW 15

  20. Brief digression Ref: https://goo.gl/kDTYnW 15

  21. Brief digression PING use ICMP (Internet Control Message Protocol) NOT TCP over IP • Default data size is 56 bytes plus header (8 bytes) • 16

  22. Brief digression PING use ICMP (Internet Control Message Protocol) NOT TCP over IP • Default data size is 56 bytes plus header (8 bytes) • 16

  23. Brief digression PING use ICMP (Internet Control Message Protocol) NOT TCP over IP • Default data size is 56 bytes plus header (8 bytes) • ping -M do -s 1473 -c 3 192.168.0.34 16

  24. Brief digression PING use ICMP (Internet Control Message Protocol) NOT TCP over IP • Default data size is 56 bytes plus header (8 bytes) • ping -M do -s 1473 -c 3 192.168.0.34 16

  25. Brief digression PING use ICMP (Internet Control Message Protocol) NOT TCP over IP • Default data size is 56 bytes plus header (8 bytes) • Not good enough! 16

  26. Brief digression 17

  27. Brief digression TCP means Transmission Control Protocol and as the name says, it is design to control the data transmission happening between source and destination. TCP implementations use the IP protocol encapsulation for the transmission of the data: 17

  28. Brief digression TCP means Transmission Control Protocol and as the name says, it is design to control the data transmission happening between source and destination. TCP implementations use the IP protocol encapsulation for the transmission of the data: 17

  29. Brief digression TCP means Transmission Control Protocol and as the name says, it is design to control the data transmission happening between source and destination. TCP implementations use the IP protocol encapsulation for the transmission of the data: Looks the same thing than before right? 17

  30. Brief digression TCP means Transmission Control Protocol and as the name says, it is design to control the data transmission happening between source and destination. TCP implementations use the IP protocol encapsulation for the transmission of the data: Looks the same thing than before right? WRONG! 17

  31. Brief digression A TCP implementation has several characteristics that make sense to summarize: 18

  32. Brief digression A TCP implementation has several characteristics that make sense to summarize: Is stream oriented 18

  33. Brief digression A TCP implementation has several characteristics that make sense to summarize: Is stream oriented Establish a connection 18

  34. Brief digression A TCP implementation has several characteristics that make sense to summarize: Is stream oriented Establish a connection Monitor the data transfer 18

  35. Brief digression A TCP implementation has several characteristics that make sense to summarize: Is stream oriented Establish a connection Monitor the data transfer Buffered transmission 18

  36. Brief digression A TCP implementation has several characteristics that make sense to summarize: Is stream oriented Establish a connection Monitor the data transfer Buffered transmission Unstructured stream 18

  37. Brief digression A TCP implementation has several characteristics that make sense to summarize: Is stream oriented Establish a connection Monitor the data transfer Buffered transmission Unstructured stream Full-duplex connection 18

  38. Brief digression A TCP implementation has several characteristics that make sense to summarize: Is stream oriented Establish a connection Monitor the data transfer Buffered transmission Unstructured stream Full-duplex connection Stream as a sequence of octet split in segments 18

  39. Brief digression TCP dispatcher use Dynamic Slide Window 19

  40. Brief digression TCP dispatcher use Dynamic Slide Window 19

  41. Brief digression TCP dispatcher use Dynamic Slide Window Dispatcher manages three pointers associated to each connection: The first pointer indicate the start of the sliding window The second pointer indicates the higher octet that can be dispatchtet. The third pointer indicates the window limit 19

  42. How to measure latency correctly 3 Back to us 20

  43. How to measure latency correctly 3 Back to us Check for gateway MTU cut • • ping -M do -s 1473 -c 3 192.168.0.34 20

  44. How to measure latency correctly 3 Back to us Check for gateway MTU cut • • ping -M do -s 1473 -c 3 192.168.0.34 Consider sent and received messages (IE Wsrep replicated bytes & Wsrep received • bytes) 20

  45. How to measure latency correctly 3 Back to us Check for gateway MTU cut • • ping -M do -s 1473 -c 3 192.168.0.34 Consider sent and received messages (IE Wsrep replicated bytes & Wsrep received • bytes) Check Kernel settings for: • Buffering • Congestion control • Frame utilization • 20

  46. How to measure latency correctly 3 Back to us Check for gateway MTU cut • • ping -M do -s 1473 -c 3 192.168.0.34 Consider sent and received messages (IE Wsrep replicated bytes & Wsrep received • bytes) Check Kernel settings for: • Buffering • Congestion control • Frame utilization • Test with netperf (IE) • netperf -H 192.168.1.51 -t TCP_RR -v 2 -l 60 -- -b 2 -r 250K -R 1M -s 250K,10M -S 10K,256K • 20

  47. How to measure latency correctly 3 Back to us Check for gateway MTU cut • • ping -M do -s 1473 -c 3 192.168.0.34 Consider sent and received messages (IE Wsrep replicated bytes & Wsrep received • bytes) Check Kernel settings for: • Buffering • Congestion control • Frame utilization • Test with netperf (IE) • netperf -H 192.168.1.51 -t TCP_RR -v 2 -l 60 -- -b 2 -r 250K -R 1M -s 250K,10M -S 10K,256K • Check the wsrep_evs_repl_latency value in SHOW GLOBAL STATUS like ‘wsrep%’; • 20

  48. What is the right limit? Depends by the usage Balance incoming write/s consistence reads 21

  49. Last chance for (virtually) Synchronous Wan settings: 22

  50. Last chance for (virtually) Synchronous Wan settings: evs.inactive_check_period = PT30S; evs.inactive_timeout = PT1M; evs.suspect_timeout = PT40S; evs.stats_report_period = PT3M; evs.join_retrans_period=PT0.5S � don’t use PING 22

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend