|3.12 GA||How To||MYSQL||Transaction|
What are ScaleArc MySQL transaction patterns and how to configure them?
As part of advanced configuration, ScaleArc provides the option to configure patterns/rules at varying levels of granularity. These patterns/rules determine how ScaleArc caches queries and uses read ignore statements within transaction to load balance traffic. Contact firstname.lastname@example.org for additional details on configuring these features.
|Read/Write Split Within Transaction||
Enabling this option will allow ScaleArc to load balance SQL statement within a transaction. Note that load balancing happens only for the read part of a transaction. Additionally, users can provide transaction load balancing and transaction cache pattern to perform selective load balancing and caching of read queries in any part of transaction.
Enable for repeatable read - select this option to enable Read/Write split within transaction for server with repeatable read level of isolation.
|Default is OFF. Turn ON to enable the feature. If you need to configure advanced rules, contact email@example.com.|
Follow the steps below to configure a transaction pattern which will decide the behavior for caching, load balancing, and read ignore for transactions. You can also enable/disable a pattern.
- Click on the gear icon to add/configure patterns for the databases.
- Enter the patterns.
Complete the entries as follows:Field/ButtonDescriptionUser input
ADD Pattern button Opens the related screen. Create a pattern and ensure that it's entered in the order in which you want it executed. Order Specifies the order in which the query should be executed. Enter the order. Rules Enter the pattern's regular expression. Enter the rule. Time To Live Defines when the cache expires. Enter a value when you create a pattern. Read Ignore This option allows ScaleArc to treat matching SQL statements as write instead of read. This applies only in transaction. Select enabled/ disabled Cache This option allows ScaleArc to perform caching of matching SQL statements in tranasaction. Select enabled/ disabled LB This option allows ScaleArc to perform load-balancing of matching SQL statements in transaction. Select enabled/ disabled Enabled Disables or enables a transaction rule from executing, depending on its state. You can enable or disable this option during or after you create the pattern. The default is enabled. Delete icon You can also click on the delete icon to delete the cache rule. Click icon to delete
Write Ignore Rules
Follow the steps below to configure stored procedure which will exclude certain MySQL SQL statements from being detected as write statements.
- Click on the Write Ignore Rules tab.
- Click on Add Rule to add Write Ignore rules for the database. Click on Save when done.
- Click on List Stored Procedures to view the list of Write Ignore rules created.
Query patterns created here are matched against each SQL statement. If matched, connections will unstick from the existing server connection.
- Click on the Unstick Query tab.
- Click on Add Rule to create a query pattern for an unstick query. Click on Save.