Explore PolarDB‑X v2.4.2: New Proxy, Multi‑Language Connectors, and High‑Performance Features
PolarDB‑X version 2.4.2 introduces a Java‑based proxy, multi‑language client drivers, enhanced HA switching, MySQL‑compatible replication, performance testing results, and the open‑source MCP server for AI integration, providing a comprehensive overview of the latest distributed database capabilities.
PolarDB‑X v2.4.2 Release Overview
PolarDB‑X (Alibaba Cloud’s cloud‑native distributed database) officially released version 2.4.2 in September 2025, adding a new client driver (PolarDB‑X Connector), a new open‑source polardbx‑proxy component, and fixing numerous issues such as DDL online changes, scaling, and data TTL.
PolarDB‑X Distributed Edition Introduction
PolarDB‑X is a cloud‑native integrated database that combines centralized and distributed architectures using a shared‑nothing storage‑compute separation design. It supports horizontal scaling, distributed transactions, mixed workloads, high availability, high throughput, large storage, low latency, and full MySQL compatibility.
PolarDB offers multiple deployment forms (public cloud, private cloud, DBStack, lightweight) that share the same kernel version, ensuring compatibility across environments and reducing management cost.
New Features in v2.4.2
polardbx‑proxy Component
polardbx‑proxy is a Java‑based high‑performance proxy for PolarDB‑X Standard Edition. It provides automatic master node detection, seamless HA switching, read‑write separation, instance‑level connection pooling, load balancing, and other capabilities. The open‑source repository is https://github.com/polardb/polardbx-proxy.
Read‑write separation & load balancing based on active request count
Consistent read from replicas
Transaction‑level connection pool
Fast HA detection & idempotent retry connection retention
Prepared‑statement performance boost & pass‑through
Feature Experience
Deploy the proxy with a Docker image and start it with a single command.
wget https://raw.githubusercontent.com/polardb/polardbx-proxy/refs/heads/main/polardbx-proxy/quick_start.sh
quick_start.sh -e backend_address=127.0.0.1:3306 -e backend_username=appuser -e backend_password=appuser -e memory=4294967296backend_address: database IP:port (leader or follower)
backend_username: database user
backend_password: password (must use mysql_native_password)
memory: proxy memory in bytes (recommended 16 GB, minimum 4 GB)
After startup the proxy listens on port 3307 and can be accessed directly.
mysql -Ac -h127.0.0.1 -P3307 -uappuser -pappuserManagement Commands
show cluster – query PolarDB‑X Paxos cluster information
show rw / show ro – view proxy connection pool status
show properties – view proxy configuration parameters
JDBC/GO/C++ Client Drivers
PolarDB‑X Connector provides multi‑language drivers with automatic master node detection, HA switching, read‑write separation, and load balancing. Compared with the proxy, it reduces the need for an extra proxy deployment.
Supports JDBC, Go, and C++
Directly connects to PolarDB‑X 2.0 Standard or Enterprise edition
Provides load balancing across multiple nodes in Enterprise edition
Driver download links:
Java: https://repo1.maven.org/maven2/com/alibaba/polardbx/polardbx-connector-java
Go: https://github.com/polardb/polardbx-connector-go
C++: https://github.com/polardb/polardbx-connector-cpp
JDBC Usage Example
<dependency>
<groupId>com.alibaba.polardbx</groupId>
<artifactId>polardbx-connector-java</artifactId>
<version>2.2.10</version>
</dependency> Class.forName("com.alibaba.polardbx.Driver");
try (final Connection conn = DriverManager.getConnection(
"jdbc:polardbx://127.0.0.1:3306/", "root", "*****");
final Statement stmt = conn.createStatement()) {
try (final ResultSet rs = stmt.executeQuery("select 1")) {
for (int i = 0; i < rs.getMetaData().getColumnCount(); ++i) {
System.out.print(rs.getMetaData().getColumnName(i + 1) + "\t");
}
System.out.println();
while (rs.next()) {
for (int i = 0; i < rs.getMetaData().getColumnCount(); ++i) {
System.out.print(rs.getObject(i + 1) + "\t");
}
System.out.println();
}
}
}Go Driver Example
go get github.com/polardb/polardbx-connector-go import (
_ "github.com/polardb/polardbx-connector-go"
)
db, err := sql.Open("polardbx", "user:password@tcp(ip:port)/dbname")
if err != nil {
panic(err)
}
db.SetConnMaxLifetime(time.Minute * 3)
db.SetMaxOpenConns(10)
db.SetMaxIdleConns(10)High‑Availability Seamless Switching
PolarDB‑X combined with the connector provides HA switching without application errors. When a DBA takes a primary node offline, the driver blocks connection acquisition until the HA switch completes, ensuring ongoing transactions are not interrupted.
Recommendation: use Druid connection pool version ≥ 1.2.24 to benefit from the driver’s HA checkpoints.
MySQL Binlog Replication Compatibility
v2.4.2 adds support for MySQL‑compatible master‑slave replication. The source MySQL creates a replication user, and PolarDB‑X acts as a replica using binlog positions. Detailed steps are provided for both forward and reverse replication.
PolarDB‑X Model Context Protocol (MCP) Server
The open‑source MCP Server is designed for AI agents to interact with PolarDB‑X. It offers tools (SQL execution, cluster monitoring, command management) and resources (schema queries in JSON). It is distributed as an npm package.
# Install globally
npm install -g polardbx-mcp
# Or install locally
npm install polardbx-mcpConfiguration example (environment variables for host, port, user, password, database) is shown.
Conclusion
PolarDB‑X continues to innovate with 100 % native compatibility, multi‑region disaster recovery, support for major operating systems and chips, and security certifications. For more details, visit the official documentation and release notes.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
