Blog

MySQL Client Connection Handling in the Tungsten Connector

In this blog post, we talk about how query connections are handled by the Tungsten Connector, especially read-only connections.

There are multiple ways to configure session handling in the Connector. The three main modes are Bridge, Proxy/Direct and Proxy/SmartScale.

In Bridge mode, the data source to connect to is chosen ONCE for the lifetime of the connection, which means that the selection of a different node will only happen if a NEW connection is opened through the Connector.

So if your application reuses its connections, all traffic sent through that session will continue to land on the selected read slave, i.e., when using connection pooling.

http://docs.continuent.com/tungsten-clustering-6.0/connector-bridgemode.html

The key difference is in how the slave latency checking is handled:

  • In Bridge mode, the latency is checked at connection time, and you will stick to the slave for the connection lifetime (which will be ended if the slave goes offline).
  • In Proxy modes, the latency is re-evaluated before each query, which can bring the connection to another slave if the latency becomes too high during the life of the connection.

If you have long-lasting, read-only connections that should not read from stale slaves, then use a Proxy mode.

If your connection lifetime is short (i.e make/break - one transaction then disconnect), or your application is not sensitive to reasonably outdated data for reads, then use Bridge mode and its optional read-only port.

In future articles, we will continue to cover more advanced subjects of interest!

Questions? Contact us.

About the Author

Eric M. Stone
COO

Eric is a veteran of fast-paced, large-scale enterprise environments with 35 years of Information Technology experience. With a focus on HA/DR, from building data centers and trading floors to world-wide deployments, Eric has architected, coded, deployed and administered systems for a wide variety of disparate customers, from Fortune 500 financial institutions to SMB’s.

Add new comment