# Cat Router

The `cat` router is a special router that concatenates result sets.

*Note:* This module is experimental and must be built from source. The\
module is deprecated in MaxScale 23.08 and might be removed in a future\
release.

### Configuration

The router has no special parameters. To use it, define a service with`router=cat` and add the servers you want to use.

### Behavior

The order the servers are defined in is the order in which the servers are\
queried. This means that the results are ordered based on the `servers`\
parameter of the service. The result will only be completed once all servers\
have executed this.

All commands executed via this router will be executed on all servers. This\
means that an INSERT through the `cat` router will send it to all servers. In\
the case of commands that do not return resultsets, the response of the last\
server is sent to the client. This means that if one of the earlier servers\
returns a different result, the client will not see it.

As the intended use-case of the router is to mainly reduce multiple result sets\
into one, it has no mechanisms to prevent writes from being executed on slave\
servers (which would cause data corruption or replication failure). Take great\
care when performing administrative operations though this router.

If a connection to one of the servers is lost, the client connection will also\
be closed.

### Example

Here is a simple example service definition that uses the servers from the [Configuring Servers](/docs/maxscale/maxscale-archive/archive/mariadb-maxscale-23-02/mariadb-maxscale-23-02-tutorials/mariadb-maxscale-2302-configuring-servers.md) tutorial and the\
credentials from the [MaxScale Tutorial](/docs/maxscale/maxscale-archive/archive/mariadb-maxscale-23-02/mariadb-maxscale-23-02-tutorials/mariadb-maxscale-2302-setting-up-mariadb-maxscale.md).

```
[concat-service]
type=service
router=cat
servers=dbserv1,dbserv2,dbserv3
user=maxscale
password=maxscale_pw
```

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/maxscale/maxscale-archive/archive/mariadb-maxscale-23-02/mariadb-maxscale-23-02-routers/mariadb-maxscale-2302-cat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
