diff --git a/Documentation-Contents.md b/Documentation-Contents.md index f19797d55..fd13f3bf1 100644 --- a/Documentation-Contents.md +++ b/Documentation-Contents.md @@ -44,33 +44,35 @@ - [Replication Proxy with the Binlog Router Tutorial](Tutorials/Replication-Proxy-Binlog-Router-Tutorial.md) - [RabbitMQ Setup and MaxScale Integration Tutorial](Tutorials/RabbitMQ-Setup-And-MaxScale-Integration.md) - [Nagios Plugins for MaxScale Tutorial](Tutorials/Nagios-Plugins.md) + - [Simple Schema Sharding Tutorial](Tutorials/Simple-Sharding-Tutorial.md) ## Routers - - [Read Write Split](routers/ReadWriteSplit.md) - - [Read Connnection Router](routers/ReadConnRoute.md) - - [Schemarouter](routers/SchemaRouter.md) + - [Read Write Split](Routers/ReadWriteSplit.md) + - [Read Connnection Router](Routers/ReadConnRoute.md) + - [Schemarouter](Routers/SchemaRouter.md) ## Filters Here are detailed documents about the filters MaxScale offers. They contain configuration guides and example use cases. Before reading these,you should have read the filter tutorial so that you know how they work and how to configure them. - - [Query Log All](filters/Query-Log-All-Filter.md) - - [Regex Filter](filters/Regex-Filter.md) - - [Tee Filter](filters/Tee-Filter.md) - - [Top N Filter](filters/Top-N-Filter.md) - - [Database Firewall Filter](filters/Database-Firewall-Filter.md) - - [RabbitMQ Filter](filters/RabbitMQ-Filter.md) + - [Query Log All](Filters/Query-Log-All-Filter.md) + - [Regex Filter](Filters/Regex-Filter.md) + - [Tee Filter](Filters/Tee-Filter.md) + - [Top N Filter](Filters/Top-N-Filter.md) + - [Database Firewall Filter](Filters/Database-Firewall-Filter.md) + - [RabbitMQ Filter](Filters/RabbitMQ-Filter.md) + - [Named Server Filter](Filters/Named-Server-Filter.md) ## Monitors - - [MySQL Monitor](monitors/MySQL-Monitor.md) - - [Galera Monitor](monitors/Galera-Monitor.md) - - [Multi-Master Monitor](monitors/MM-Monitor.md) - - [MySQL Cluster Monitor](monitors/NDB-Cluster-Monitor.md) + - [MySQL Monitor](Monitors/MySQL-Monitor.md) + - [Galera Monitor](Monitors/Galera-Monitor.md) + - [Multi-Master Monitor](Monitors/MM-Monitor.md) + - [MySQL Cluster Monitor](Monitors/NDB-Cluster-Monitor.md) ## Utilities - - [RabbitMQ Consumer Client](filters/RabbitMQ-Consumer-Client.md) + - [RabbitMQ Consumer Client](Filters/RabbitMQ-Consumer-Client.md) ## Design Documents diff --git a/filters/Database-Firewall-Filter.md b/Filters/Database-Firewall-Filter.md similarity index 100% rename from filters/Database-Firewall-Filter.md rename to Filters/Database-Firewall-Filter.md diff --git a/Filters/Named-Server-Filter.md b/Filters/Named-Server-Filter.md new file mode 100644 index 000000000..3e41092de --- /dev/null +++ b/Filters/Named-Server-Filter.md @@ -0,0 +1,92 @@ +Named Server Filter + +# Overview + +The **namedserverfilter** is a filter module for MaxScale which is able to route queries to servers based on regular expression matches. + +# Configuration + +The configuration block for the Named Server filter requires the minimal filter options in it’s section within the maxscale.cnf file, stored in /etc/maxscale.cnf. + +``` +[NamedServerFilter] +type=filter +module=namedserverfilter +match=some string +server=server2 + +[MyService] +type=service +router=readwritesplit +servers=server1,server2 +user=myuser +passwd=mypasswd +filters=NamedServerFilter +``` + +## Filter Options + +The named server filter accepts the options ignorecase or case. These define if the pattern text should take the case of the string it is matching against into consideration or not. + +## Filter Parameters + +The named server filter requires two mandatory parameters to be defined. + +### `match` + +A parameter that can be used to match text in the SQL statement which should be replaced. + +``` +match=TYPE[ ]*= +``` + +If the filter option ignorecase is used all regular expressions are evaluated with the option to ignore the case of the text, therefore a match option of select will match both type, TYPE and any form of the word with upper or lowercase characters. + +### `server` + +This is the server where matching queries will be router. The server should be in use by the service which uses this filter. + +``` +server=server2 +``` + +### `source` + +The optional source parameter defines an address that is used to match against the address from which the client connection to MaxScale originates. Only sessions that originate from this address will have the match and replacement applied to them. + +``` +source=127.0.0.1 +``` + +### `user` + +The optional user parameter defines a user name that is used to match against the user from which the client connection to MaxScale originates. Only sessions that are connected using this username will have the match and replacement applied to them. + +``` +user=john +``` + +## Examples + +### Example 1 - Route queries targeting a specific table to a server + +This will route all queries matching the regular expression ` *from *users` to the server named *server2*. The filter will ignore character case in queries. + +A query like `SELECT * FROM users` would be routed to server2 where as a query like `SELECT * FROM accounts` would be routed according to the normal rules of the router. + +``` +[NamedServerFilter] +type=filter +module=namedserverfilter +match= *from *users +options=ignorecase +server=server2 + +[MyService] +type=service +router=readwritesplit +servers=server1,server2 +user=myuser +passwd=mypasswd +filters=NamedServerFilter +``` diff --git a/filters/Query-Log-All-Filter.md b/Filters/Query-Log-All-Filter.md similarity index 100% rename from filters/Query-Log-All-Filter.md rename to Filters/Query-Log-All-Filter.md diff --git a/filters/RabbitMQ-Consumer-Client.md b/Filters/RabbitMQ-Consumer-Client.md similarity index 100% rename from filters/RabbitMQ-Consumer-Client.md rename to Filters/RabbitMQ-Consumer-Client.md diff --git a/filters/RabbitMQ-Filter.md b/Filters/RabbitMQ-Filter.md similarity index 100% rename from filters/RabbitMQ-Filter.md rename to Filters/RabbitMQ-Filter.md diff --git a/filters/Regex-Filter.md b/Filters/Regex-Filter.md similarity index 100% rename from filters/Regex-Filter.md rename to Filters/Regex-Filter.md diff --git a/filters/Tee-Filter.md b/Filters/Tee-Filter.md similarity index 100% rename from filters/Tee-Filter.md rename to Filters/Tee-Filter.md diff --git a/filters/Top-N-Filter.md b/Filters/Top-N-Filter.md similarity index 100% rename from filters/Top-N-Filter.md rename to Filters/Top-N-Filter.md diff --git a/monitors/Galera-Monitor.md b/Monitors/Galera-Monitor.md similarity index 100% rename from monitors/Galera-Monitor.md rename to Monitors/Galera-Monitor.md diff --git a/monitors/MM-Monitor.md b/Monitors/MM-Monitor.md similarity index 100% rename from monitors/MM-Monitor.md rename to Monitors/MM-Monitor.md diff --git a/monitors/MySQL-Monitor.md b/Monitors/MySQL-Monitor.md similarity index 100% rename from monitors/MySQL-Monitor.md rename to Monitors/MySQL-Monitor.md diff --git a/monitors/NDB-Cluster-Monitor.md b/Monitors/NDB-Cluster-Monitor.md similarity index 100% rename from monitors/NDB-Cluster-Monitor.md rename to Monitors/NDB-Cluster-Monitor.md diff --git a/Release-Notes/MaxScale-0.5-Release-Notes.md b/Release-Notes/MaxScale-0.5-Release-Notes.md index 3ae56ce9e..5f09d7bfd 100644 --- a/Release-Notes/MaxScale-0.5-Release-Notes.md +++ b/Release-Notes/MaxScale-0.5-Release-Notes.md @@ -1,4 +1,4 @@ -MaxScale Release Notes +# MariaDB MaxScale 0.5 Alpha Release Notes 0.5 Alpha diff --git a/Release-Notes/MaxScale-0.6-Release-Notes.md b/Release-Notes/MaxScale-0.6-Release-Notes.md index ff7033e4d..4b2c445c3 100644 --- a/Release-Notes/MaxScale-0.6-Release-Notes.md +++ b/Release-Notes/MaxScale-0.6-Release-Notes.md @@ -1,4 +1,4 @@ -MaxScale Release Notes +# MariaDB MaxScale 0.6 Alpha Release Notes 0.6 Alpha diff --git a/Release-Notes/MaxScale-0.7-Release-Notes.md b/Release-Notes/MaxScale-0.7-Release-Notes.md index bc43ee00d..21d9320ec 100644 --- a/Release-Notes/MaxScale-0.7-Release-Notes.md +++ b/Release-Notes/MaxScale-0.7-Release-Notes.md @@ -1,4 +1,4 @@ -MaxScale Release Notes +# MariaDB MaxScale 0.7 Alpha Release Notes 0.7 Alpha diff --git a/Release-Notes/MaxScale-1.0-Release-Notes.md b/Release-Notes/MaxScale-1.0-Release-Notes.md index a15757e0f..4ce52f6c3 100644 --- a/Release-Notes/MaxScale-1.0-Release-Notes.md +++ b/Release-Notes/MaxScale-1.0-Release-Notes.md @@ -1,4 +1,4 @@ -MaxScale Release Notes +# MariaDB MaxScale 1.0 Beta Release Notes 1.0 Beta diff --git a/Release-Notes/MaxScale-1.0.1-Release-Notes.md b/Release-Notes/MaxScale-1.0.1-Release-Notes.md index a82083ac9..5586696a4 100644 --- a/Release-Notes/MaxScale-1.0.1-Release-Notes.md +++ b/Release-Notes/MaxScale-1.0.1-Release-Notes.md @@ -1,4 +1,4 @@ -MaxScale Release Notes +# MariaDB MaxScale 1.0.1 Beta Release Notes 1.0.1 Beta diff --git a/Release-Notes/MaxScale-1.0.3-Release-Notes.md b/Release-Notes/MaxScale-1.0.3-Release-Notes.md index 67c5e3ece..db8329366 100644 --- a/Release-Notes/MaxScale-1.0.3-Release-Notes.md +++ b/Release-Notes/MaxScale-1.0.3-Release-Notes.md @@ -1,4 +1,4 @@ -MaxScale Release Notes +# MariaDB MaxScale 1.0.3 Release Notes 1.0.3 GA diff --git a/Release-Notes/MaxScale-1.0.4-Release-Notes.md b/Release-Notes/MaxScale-1.0.4-Release-Notes.md index db341e893..9103c830a 100644 --- a/Release-Notes/MaxScale-1.0.4-Release-Notes.md +++ b/Release-Notes/MaxScale-1.0.4-Release-Notes.md @@ -1,4 +1,4 @@ -# MaxScale Release Notes +# MariaDB MaxScale 1.0.4 Release Notes 1.0.4 GA diff --git a/Release-Notes/MaxScale-1.0.5-Release-Notes.md b/Release-Notes/MaxScale-1.0.5-Release-Notes.md index 4b65fd92f..e979ff6c1 100644 --- a/Release-Notes/MaxScale-1.0.5-Release-Notes.md +++ b/Release-Notes/MaxScale-1.0.5-Release-Notes.md @@ -1,4 +1,4 @@ -MaxScale Release Notes 1.0.5 GA +# MariaDB MaxScale 1.0.5 Release Notes This document details the changes in version 1.0.5 since the release of the 1.0.4 GA of the MaxScale product. diff --git a/Release-Notes/MaxScale-1.1-Release-Notes.md b/Release-Notes/MaxScale-1.1-Release-Notes.md index c3ed66b73..e196335b9 100644 --- a/Release-Notes/MaxScale-1.1-Release-Notes.md +++ b/Release-Notes/MaxScale-1.1-Release-Notes.md @@ -1,4 +1,4 @@ -# MaxScale Release Notes +# MariaDB MaxScale 1.1 Release Notes ## 1.1 GA diff --git a/Release-Notes/MaxScale-1.1.1-Release-Notes.md b/Release-Notes/MaxScale-1.1.1-Release-Notes.md index 6c1631d4c..689323543 100644 --- a/Release-Notes/MaxScale-1.1.1-Release-Notes.md +++ b/Release-Notes/MaxScale-1.1.1-Release-Notes.md @@ -1,6 +1,6 @@ -# MaxScale Release Notes +# MariaDB MaxScale 1.1.1 Release Notes -## 1.1 GA +## 1.1.1 GA This document details the changes in version 1.1.1 since the release of the 1.1 GA Release of the MaxScale product. diff --git a/Release-Notes/MaxScale-1.2.0-Release-Notes.md b/Release-Notes/MaxScale-1.2.0-Release-Notes.md index 43560ddff..4ffdcba1f 100644 --- a/Release-Notes/MaxScale-1.2.0-Release-Notes.md +++ b/Release-Notes/MaxScale-1.2.0-Release-Notes.md @@ -1,4 +1,4 @@ -# MaxScale Release Notes +# MariaDB MaxScale 1.2 Release Notes ## 1.2 GA diff --git a/routers/ReadConnRoute.md b/Routers/ReadConnRoute.md similarity index 100% rename from routers/ReadConnRoute.md rename to Routers/ReadConnRoute.md diff --git a/routers/ReadWriteSplit.md b/Routers/ReadWriteSplit.md similarity index 98% rename from routers/ReadWriteSplit.md rename to Routers/ReadWriteSplit.md index e58367789..7fb6d5cf0 100644 --- a/routers/ReadWriteSplit.md +++ b/Routers/ReadWriteSplit.md @@ -100,6 +100,10 @@ disable_slave_recovery=true master_accept_reads=true ``` +### Routing hints + +The readwritesplit router supports routing hints. For a detailed guide on hint syntax and functionality, please see [this](../Reference/Hint-Syntax.md) document. + ## Limitations In Master-Slave replication cluster also read-only queries are routed to master too in the following situations: diff --git a/routers/SchemaRouter.md b/Routers/SchemaRouter.md similarity index 98% rename from routers/SchemaRouter.md rename to Routers/SchemaRouter.md index d1de66b2b..55c3ad706 100644 --- a/routers/SchemaRouter.md +++ b/Routers/SchemaRouter.md @@ -64,4 +64,4 @@ The schemarouter router currently has some limitations due to the nature of the ## Examples -[Here](../../Tutorials/Simple-Sharding-Tutorial.md) is a small tutorial on how to set up a sharded database. +[Here](../Tutorials/Simple-Sharding-Tutorial.md) is a small tutorial on how to set up a sharded database.