Announcing MariaDB Connector/R2DBC 1.1
We are pleased to announce MariaDB Connector/R2DBC 1.1 as GA (Generally Available).
MariaDB Connector/R2DBC 1.1 now implements the R2DBC 0.9.1 specification. R2DBC operations are non-blocking, which makes the R2DBC API more scalable than Java’s standard JDBC API.
MariaDB Connector/R2DBC 1.1 includes the following new features:
- Support for failover and load-balancing with transaction replay
- Support of the R2DBC 0.9 specification
- Full implementation of JPMS modularity
- Optimized back pressure handling
- Option to restrict allowed authentication plugins
- Support of the MariaDB Enterprise Server and MariaDB Community Server 10.6 “skip metadata” feature
Failover and Load Balancing
MariaDB Connector/R2DBC provides internal failover and load balancing for multi-mode topologies. A highly available MariaDB stack with MariaDB MaxScale as a proxy layer and MariaDB Enterprise Server as the database layer requires the ability to fail over connections from one MariaDB MaxScale instance to another. By providing both host IPs and ports, the connector will connect to the second MaxScale instance when the first one cannot be reached.
When using MariaDB Cluster (powered by Galera) a connection string can include the host IPs and ports of all cluster nodes. MariaDB Connector/R2DBC will connect in a sequential manner to the first available node in the provided list. Nodes will be added to a block list for a given time if they have not been reachable.
The load balancing option allows MariaDB Connector/R2DBC to distribute the connections over the available nodes by connecting randomly to a node in the host list. When creating a connection pool the created connections will be distributed equally between the nodes.
A block list also exists when load balancing is used, to avoid reconnecting to a node that is known to be not reachable.
MariaDB Connector/R2DBC 1.1 will try to re-execute a cached transaction after failover when transaction replay is enabled. A failover can be completely transparent to the application.
Support of the R2DBC 0.9.1 specification
To support the new R2DBC 0.9.1 specification, the following implementations have been added/changed:
- Support for improved bind parameter declarations
- New Connection.beginTransaction(TransactionDefinition)
- New NoSuchOptionException
- Changed RowMetadata
- New statement timeout
- Implement SPI test kit to validate the driver with the specification
Full implementation of JPMS modularity
MariaDB Connector/R2DBC implements JPMS modularity when using Java 9 and later. This change improves security by hiding and protecting internal packages from reflection. This change improves performance by enabling faster detection of missing modules on startup and lighter packaging for standalone applications.
MariaDB Connector/R2DBC is available from the MariaDB Download page and from the Maven Repository.
MariaDB Connector/R2DBC Documentation is provided with examples, both native and using Connector/R2DBC with Spring Data R2DBC to make it “easier to build Spring-powered applications that use relational data access technologies in a reactive application stack”. Sample applications exist on our MariaDB Developer Hub.