Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Webinar Slides: Intelligent Database Proxies: Routing & Transparent Failover

145 vues

Publié le

This webinar by our proxies guru, Gilles Reyrat, is the second installment of our database proxies webinar series and follows ‘Introduction to Database Proxies’. This second session looks at two breeds of proxies: the “fast & simple proxy” (aka 4 layer proxy) and the “intelligent proxy”; and takes a closer look at transparent failover as well as read-write splitting.


AGENDA

- Recap: Introduction to Database Proxies
- Two Breeds of Proxies
- The Fast & Simple Proxy (4 Layer Proxy)
- The Intelligent Proxy
- Transparent Failover
- Connection / Failure / Failover / Reconnection
- Read-Write Splitting
- 4 Layer Proxies R/W Split
- With Intelligent Proxies
- SQL Parsing / Application Driven / Smart Scale


PRESENTER

Gilles Rayrat - VP of Engineering, Continuent - has over 20 years experience in software engineering. Previously holding positions at Orange and Xerox, he joined the Continuent adventure in 2005. As the connectivity expert at Continuent, he has worn many hats including software development, QA, support, project and operations management. Gilles has held most of the engineering positions that he now manages, giving him both deep and wide experience.

Publié dans : Internet
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

Webinar Slides: Intelligent Database Proxies: Routing & Transparent Failover

  1. 1. The MySQL Availability Company INTELLIGENT DATABASE PROXIES Routing and transparent failover Gilles Rayrat
  2. 2. About the Presenter Gilles Rayrat VP of Engineering Co-author and main developer of the Tungsten Proxy
  3. 3. IN THE LAST EPISODE…
  4. 4. Recap Proxies make clusters appear as simple Databases to applications Application Proxy
  5. 5. Recap Proxies make clusters appear as simple Databases to applications Even in complex topologies Application Proxy
  6. 6. Recap Proxies make clusters appear as simple Databases to applications Even in complex topologies With read scaling optimizations Application Proxy
  7. 7. 2 BREEDS OF PROXIES
  8. 8. 2 BREEDS OF PROXIES: SIMPLE
  9. 9. The fast and simple Application Proxy
  10. 10. The fast and simple Application Proxy Connects to a single node
  11. 11. The fast and simple aka. layer 4 proxy Application Proxy Connects to a single node Can route to replicas, pick at connection time
  12. 12. The fast and simple aka. layer 4 proxy Application Proxy Connects to a single node Can route to replicas, pick at connection time Fast & Transparent
  13. 13. The fast and simple aka. layer 4 proxy Application Proxy Connects to a single node Can route to replicas, pick at connection time Fast & Transparent Broken node = broken connection
  14. 14. The fast and simple aka. layer 4 proxy Application Proxy Some players: • HA proxy • Nginx • Envoy • F5 • ELB
  15. 15. The fast and simple aka. layer 4 proxy Application Tungsten Proxy Some players: • HA proxy • Nginx • Envoy • F5 • ELB • Tungsten Proxy Tungsten Cluster
  16. 16. 2 BREEDS OF PROXIES: INTELLIGENT
  17. 17. The intelligent proxy Application Proxy ”Real” connection to the proxy Wire protocol understood
  18. 18. The intelligent proxy Application Proxy ”Real” connection to the proxy Wire protocol understood Even at connection time
  19. 19. The intelligent proxy Application Proxy ”Real” connection to the proxy Wire protocol understood Even at connection time Automatic or app-driven load balancing
  20. 20. The intelligent proxy Application Proxy ”Real” connection to the proxy Wire protocol understood Even at connection time Automatic or app-driven load balancing Transparent failover
  21. 21. The intelligent proxy Application Proxy Some players: • ProxySQL • Maxscale • MySQL router • Tungsten Proxy
  22. 22. TRANSPARENT FAILOVER
  23. 23. Connection to a proxy Application Tungsten Proxy application <> proxy connection proxy <> database connection
  24. 24. Failure Application Tungsten Proxy application <> proxy proxy <> database connection BROKEN
  25. 25. Failure Application Tungsten Proxy application <> proxy connection OK proxy <> database connection BROKEN
  26. 26. Failover Application Tungsten Proxy application <> proxy: Traffic is paused proxy <> database: automatic reconnection (Manager)
  27. 27. Reconnection Application Tungsten Proxy application <> proxy: traffic resumed proxy <> database: fresh connection
  28. 28. READ-WRITE SPLITTING
  29. 29. READ-WRITE SPLITTING • Layer 4 proxies r/w split • With intelligent proxies • SQL parsing • Application driven • Smart scale
  30. 30. With a layer 4 proxy Application Proxy Single node picked per connection
  31. 31. Port based Application Proxy Target PORT on the proxy determines the connection type 33063307
  32. 32. Host based Application Proxy Target HOST reroutes to the desired node127.0.0.1127.0.0.2
  33. 33. READ-WRITE SPLITTING • Layer 4 proxies r/w split • With intelligent proxies • SQL parsing • Application driven • Smart scale
  34. 34. R/W splitting with an intelligent proxy Application Tungsten Proxy 3307 3306 Port and Host based r/w split also available
  35. 35. READ-WRITE SPLITTING • Layer 4 proxies r/w split • With intelligent proxies • SQL parsing • Application driven • Smart scale
  36. 36. Automatic R/W splitting Application Tungsten Proxy Automated SQL analysis SELECTSHOW
  37. 37. Automatic R/W splitting Application Tungsten Proxy Transactions remain on master BEGIN… COMMIT
  38. 38. READ-WRITE SPLITTING • Layer 4 proxies r/w split • With intelligent proxies • SQL parsing • Application driven • Smart scale
  39. 39. Application-driven R/W splitting Application Tungsten Proxy Directives given through SQL comments TUNGSTEN USE RO_RELAXED
  40. 40. Application-driven R/W splitting Application Tungsten Proxy Directives given through SQL comments • For a single statement TUNGSTEN USE RO_RELAXED /* TUNGSTEN USE RO_RELAXED */ SELECT xxx
  41. 41. Application-driven R/W splitting Application Tungsten Proxy Directives given through SQL comments • For a single statement • For a block TUNGSTEN USE RO_RELAXED /* TUNGSTEN USE RO_RELAXED */ SELECT xxx -- TUNGSTEN USE RO_RELAXED SELECT xxx SELECT yyy
  42. 42. READ-WRITE SPLITTING • Layer 4 proxies r/w split • With intelligent proxies • SQL parsing • Application driven • Smart scale
  43. 43. Smart Scale Application Tungsten Proxy Avoids reading stale data by recording write positionWrite position N
  44. 44. Smart Scale Application Tungsten Proxy Avoids reading stale data by recording write position Reads from slave only if last write has reached the replica Write position N Is Write N replicated?
  45. 45. Smart Scale Application Tungsten Proxy Avoids reading stale data by recording write position Reads from slave only if last write has reached the replica Otherwise reads from primary Write position N Until replicas catch up
  46. 46. RECAP
  47. 47. Fast and simple proxy Application Proxy
  48. 48. Intelligent proxy Application Proxy
  49. 49. Transparent failover Application Tungsten Proxy
  50. 50. Read from replicas Application Tungsten Proxy Many read/write splitting possibilities Write position N Is Write N replicated?
  51. 51. For More Info… Product and General Information: info@continuent.com Sales Requests: sales@continuent.com
  52. 52. THANK YOU FOR LISTENING continuent.com The MySQL Availability Company Gilles Rayrat

×