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.
10. The fast and simple
Application
Proxy
Connects to a single node
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. 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. 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. The fast and simple aka. layer 4 proxy
Application
Proxy
Some players:
• HA proxy
• Nginx
• Envoy
• F5
• ELB
15. The fast and simple aka. layer 4 proxy
Application
Tungsten Proxy
Some players:
• HA proxy
• Nginx
• Envoy
• F5
• ELB
• Tungsten Proxy
Tungsten Cluster
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
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. 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