> ## Content Index
> Fetch the complete content index at: https://www.sredevops.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# MySQL 8.2 is what we were all waiting for for Kubernetes with Transparent Read/Write Splitting
- URL: https://www.sredevops.org/en/mysql-8-2-is-what-we-were-all-waiting-for-for-kubernetes-with-transparent-read-write-splitting/
- Published: 2023-11-16T19:47:47.000Z
- Updated: 2023-11-16T19:47:47.000Z
- Author: Nicolás Georger
- Tags: English, #home, #en, Cloud, Kubernetes, DevOps

Oracle recently announced the [general availability of MySQL 8.2](https://blogs.oracle.com/mysql/post/mysql-82-transparent-readwrite-splitting?ref=sredevops.org) , which includes **support for read/write splitting** . This long-awaited feature was introduced in the latest *innovation release (an equivalent of a "release candidate"),* which helps **optimize database performance and scalability** .

[Read-write splitting](https://dev.mysql.com/doc/mysql-router/8.2/en/router-read-write-splitting.html?ref=sredevops.org) allows applications to transparently direct all write traffic to read-write instances (primary/sources) and all read traffic to read-only instances, depending on the instance type (InnoDB Cluster or Replica). Cluster).

[Frederic Descamps](https://www.linkedin.com/in/freddescamps/?ref=sredevops.org) , MySQL community manager, explains:

> "At large scale, we distribute reads across replicas, but this must be managed somehow in the application: pointing writes to one place and reads to another place. Since MySQL 8.2, MySQL Router can now identify reads and writes, and then route them to primary instances in the case of an InnoDB cluster, or to an asynchronous replication source for writes and to secondary instances or replicas for reads."

You can perform a simple PoC (proof of concept) yourself, using mysql-operator:

[mysql-operator/deploy at 8.2.0-2.1.1 · mysql/mysql-operatorMySQL Operator for Kubernetes. Contribute to mysql/mysql-operator development by creating an account on GitHub.![](https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg)GitHubmysql![](https://opengraph.githubassets.com/db883678f682ce8143ce855be9263af781b9dc0871040fff21e707a6b73826fc/mysql/mysql-operator)](https://github.com/mysql/mysql-operator/tree/8.2.0-2.1.1/deploy?ref=sredevops.org)

You will need to deploy the following manifests:

```bash
kubectl apply -f "https://github.com/mysql/mysql-operator/blob/8.2.0-2.1.1/deploy/deploy-crds.yaml"
# CRDs

kubectl apply -f "https://github.com/mysql/mysql-operator/blob/8.2.0-2.1.1/deploy/deploy-operator.yaml"
# Operator 

kubectl apply -f "https://github.com/mysql/mysql-operator/blob/8.2.0-2.1.1/samples/sample-secret.yaml"
# Secret (edit recommended)

kubectl apply -f "https://github.com/mysql/mysql-operator/blob/8.2.0-2.1.1/samples/sample-cluster.yaml"
# Cluster 3 instances 1 router
```

Based on: [https://www.infoq.com/news/2023/11/mysql-read-write-splitting/](https://www.infoq.com/news/2023/11/mysql-read-write-splitting/?ref=sredevops.org)

Further reading: [https://lefred.be/content/mysql-8-2-read-write-splitting-a-what-cost/](https://lefred.be/content/mysql-8-2-read-write-splitting-a-what-cost/?ref=sredevops.org)