# MaxScale Filters

- [MaxScale Binlog Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-binlog-filter.md): Selectively replicate binary log events to replica servers. This filter uses regex matching to include or exclude specific events from the replication stream.
- [MaxScale Cache](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-cache.md): Improve query performance by caching SELECT statement results. This filter stores result sets in memory, serving identical subsequent queries directly from MaxScale.
- [MaxScale Comment Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-comment-filter.md): Inject custom comments into SQL statements. This filter allows administrators to tag queries with metadata for tracking, auditing, or debugging purposes.
- [MaxScale Consistent Critical Read Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-consistent-critical-read-filter.md): Ensure data consistency by routing reads to the primary server after a write. This filter guarantees that a client sees its own modifications immediately.
- [MaxScale Firewall Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-firewall-filter.md): Protect your database by blocking unauthorized queries. This filter inspects incoming SQL against a defined set of rules to prevent SQL injection and unauthorized access.
- [MaxScale Hintfilter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-hintfilter.md): Control query routing using SQL comments. This filter interprets hints embedded in queries to direct traffic to specific servers, primaries, or replicas.
- [MaxScale LDI Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-ldi-filter.md): Manage LOAD DATA INFILE operations. This filter splits large data loads into smaller chunks to prevent blocking and improve stability during bulk data ingestion.
- [MaxScale Masking Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-masking-filter.md): Obfuscate sensitive data in query results. This filter masks specific columns based on user roles, ensuring compliance with privacy regulations without altering the database.
- [MaxScale Maxrows Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-maxrows-filter.md): Limit the size of result sets returned to clients. This filter prevents excessive resource consumption by truncating results that exceed a configured row count.
- [MaxScale Named Server Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-named-server-filter.md): Route queries to specific servers based on regex patterns. This filter allows you to direct traffic matching defined rules to a particular backend server by name.
- [MaxScale Optimistic Transaction Execution Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-optimistic-transaction-execution-filter.md): Improve performance for read-heavy transactions. This filter attempts to execute transactions on replicas first falling back to the primary only if a write occurs.
- [MaxScale Psreuse Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-psreuse-filter.md): Optimize prepared statement execution. This filter caches prepared statements on the proxy layer reducing the overhead of re-preparing statements on backend servers.
- [MaxScale Query Log All Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-query-log-all-filter.md): Log every SQL query passing through MaxScale. This filter provides comprehensive audit trails by recording query text, execution time, and client details.
- [MaxScale Readonly](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-readonly.md): Enforce read-only access at the proxy level. This filter rejects modification statements like INSERT or UPDATE protecting the database from accidental writes.
- [MaxScale Regex Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-regex-filter.md): Rewrite or block queries using regular expressions. This versatile filter modifies SQL statements on the fly or rejects them based on pattern matching rules.
- [MaxScale Rewrite Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-rewrite-filter.md): Transform SQL queries using template-based rules. This filter modifies incoming statements to optimize performance or fix compatibility issues without changing application code.
- [MaxScale Tee Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-tee-filter.md): Duplicate query traffic to multiple targets. This filter sends a copy of incoming requests to a secondary service or server useful for testing and auditing.
- [MaxScale Throttle Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-throttle-filter.md): Regulate the rate of incoming queries. This filter prevents database overload by limiting the number of queries processed per second based on defined thresholds.
- [MaxScale Top Filter](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-top-filter.md): Identify the most expensive queries. This filter logs the top N slowest queries passing through MaxScale helping to pinpoint performance bottlenecks.
- [MaxScale Workload Capture and Replay](https://mariadb.com/docs/maxscale/reference/maxscale-filters/maxscale-workload-capture-and-replay.md): Record and replay real database traffic. This filter captures client sessions to create realistic benchmarks and test environments based on production workloads.


---

# 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/reference/maxscale-filters.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.
