How can I tell which Tungsten Connector mode I am using: Bridge, Proxy/Direct or Proxy/SmartScale?
Overview
The Skinny
Part of the power of Tungsten Clustering for MySQL / MariaDB is its intelligent MySQL Proxy, known as the Tungsten Connector. Tungsten Connector has three main modes, and depending on the type of operations you are performing (such as if you need read-write splitting), we help you choose which mode is best.
The Question
Recently, a customer asked us:
How can I tell which Tungsten Connector mode I am using: Bridge, Proxy/Direct or Proxy/SmartScale?
The Answer
Connect and Observe
You may login through the Connector to tell the difference between Bridge mode and Proxy mode (either Direct or SmartScale):
In Proxy mode, you will see the -tungsten
tag appended to the Server version string:
1 2 3 4 |
tungsten@db1:/opt/continuent/software/tungsten-clustering-6.0.5-41 # tpm connector Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 34 Server version: 5.7.26-log-tungsten MySQL Community Server (GPL) |
Once logged into the Connector in Proxy mode, you have the full set of interactive tungsten
commands available:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
mysql> tungsten help; +---------------------------------------------------------------------------------------------------------------------------------+ | Message | +---------------------------------------------------------------------------------------------------------------------------------+ | tungsten connection status: display information about the connection used for the last request ran | | tungsten connection count: gives the count of current connections to each one of the cluster datasources | | tungsten cluster status: prints detailed information about the cluster view this connector has | | tungsten show [full] processlist: list all running queries handled by this connector instance | | tungsten show variables [like '<string>']: list connector configuration options in use. The <string> may contain '%' wildcards | | tungsten flush privileges: reload user.map and refresh user credentials | | tungsten mem info: display memory information about current JVM | | tungsten gc: calls garbage collector | | tungsten help: display this help message | +---------------------------------------------------------------------------------------------------------------------------------+ |
For more information about the Connector’s command-line interface, please visit http://docs.continuent.com/tungsten-clustering-6.0/connector-inline.html
For Bridge mode, you will not see that:
1 2 3 4 |
tungsten@db1:/opt/continuent/software/tungsten-clustering-6.0.5-41 # tpm connector Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 34 Server version: 5.7.26-log MySQL Community Server (GPL) |
In Bridge mode, the tungsten
commands do not work:
1 2 |
mysql> tungsten help; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tungsten help' at line 1 |
The Library
Please read the docs!
For more information about the Tungsten Connector:
- Blog Post: MySQL Client Connection Handling in the Tungsten Connector
- Documentation: Connector Routing Types
For more documentation about Tungsten software, please visit https://docs.continuent.com
Summary
The Wrap-Up
In this blog post we discussed how one can tell which Tungsten Connector mode is in use: Bridge, Proxy/Direct or Proxy/SmartScale.
Tungsten Clustering is the most flexible, performant global database layer available today – use it underlying your SaaS offering as a strong base upon which to grow your worldwide business!
For more information, please visit https://www.continuent.com/solutions
Want to learn more or run a POC? Contact us