[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

Introducing the features and useful functions you should know when considering using Alibaba Cloud ApsaraDB for PolarDB

My name is Teraoka and I am an infrastructure engineer.
This time we will talk about a certain service of Alibaba Cloud.

Alibaba Cloud begins offering new services in Japan including cloud DB “ApsaraDB for PolarDB”

Alibaba Cloud announced on the 20th that it will start offering the relational database ``ApsaraDB for PolarDB'' in Japan on its public cloud ``Alibaba Cloud.''

Have you finally come? . .

So this time, I would like to make full use of PolarDB in the Japan region, so
I would like to introduce some useful functions when actually using it as a database for services!

What is ApsaraDB for PolarDB?

As a prerequisite, I would like to briefly touch on PolarDB.
PolarDB is a managed relational database service compatible with MySQL, PostgreSQL, and Oracle.
It is touted as the next generation managed distributed RDS developed by Alibaba and
is capable of demonstrating high performance and cost performance.

As you can see by actually using it, it
is designed with AWS's Aurora in mind as a competitor to other companies' clouds
, and in Intel's tests, QPS improved by about 1.3 times compared to "Amazon Aurora".
The result seems to be that the 95th percentile latency (delay) is improved by about 1.8 times . *1

When you are aware of Aurora, you are concerned about its features and differentiation.
I would like to summarize them in a comparative form.

Features of PolarDB and differences from Aurora

architecture

Both PolarDB and Aurora are called distributed relational database services.
The following is an architecture diagram of PolerDB, which can be roughly divided into four concepts. *2

Cluster

It is like a logical group of one Primary Node and N Read-Only Nodes, and a
DNS record called a cluster endpoint is automatically allocated to the cluster when it is created.
By accessing this endpoint, you can issue SQL to the DB.

PolarDB's endpoints also support read/write separation.※3

  • Write request: Send to Primary Node
  • Read requests: sent to primary node or read-only node depending on each node's load

It automatically determines the node to connect to internally.
Aurora has separate endpoints for writing and reading, but
PolarDB only has one endpoint and is distributed appropriately internally, which is convenient.

Primary Node

This is the only node in a cluster that can perform both writing and reading.
Write requests to the DB are basically executed to this node.
Aurora has a multi-master function and can use multiple Primary Nodes, but
PolarDB does not have that function, so it is currently not possible to distribute write requests to multiple nodes.

Read-Only Node

These are read-only nodes that can be started up to 15 in a cluster.
Although it is possible to increase or decrease it manually, by using DAS (Database Autonomous Service),
it is possible to scale in/out according to the load situation. *4
It has the AutoScall function + can be activated on up to 15 devices, which is the same as Aurora, so
you can see that they are very conscious of the functionality.

Chunk Server

For both PolarDB and Aurora, the computing processing and storage processing of each node are completely separated.
The Chunk Server is responsible for storage processing in PolarDB.
DB data is stored in this Chunk Server, and
the storage capacity can be automatically scaled up or down according to the data capacity.
Storage autoscaling is also available in Aurora, but the maximum expansion capacity is different:
Aurora has a maximum expansion capacity of 64TB, while PolarDB can expand up to 100TB.

Useful functions of PolarDB

I would like to introduce some functions that I have actually used and found useful.

Data migration support by DTS

There is no need to consider this when using PolarDB for the first time, but
if you want to switch from an existing database service, you will need to consider the following.

  • How to migrate existing DB data
  • How to reduce downtime when switching to PolarDB

In times like these, PolarDB allows you to use DTS (Data Transmission Service), so
I think it's great that there is a way to migrate data. *5

Online scale up/down

PolarDB can be scaled up and down while it is online.
In the case of Aurora, it is necessary to temporarily stop nodes, so this is probably the most differentiating feature.

I was concerned about downtime when changing specifications, so I created a test DB like the one below.

CERATE DATABASE TEST; CREATE TABLE test ( column int(10) DEFAULT NULL ) ENGINE=InnoDB;

I checked by issuing an update every second when changing the specs.

update test set column=unix_timestamp();

A message appears on the console stating that the connection will be unavailable for up to 30 seconds, but
in reality, the total time it took to complete the change was 10 minutes, of which a connection error occurred for about 10 seconds.

On the other hand, with Aurora, it is necessary to stop the node when changing the specs,
resulting in approximately 5 to 10 minutes of downtime.
To avoid this, a common practice in Aurora is
to select the desired specs, add a new read-only node, and
manually failover that node to promote it to a write node to minimize
downtime. The response is often to suppress it.

Even if you use failover, it takes more than 10 seconds, so
I think PolarDB is definitely faster.

It seems like you can have the option of allowing downtime for about 10 seconds!

Enhancement of monitoring items

PolarDB has a rich
*6 It's great because you can check not only resources such as CPU but also performance metrics around InnoDB.

For Aurora, you can see similar metrics in Performance Insights, but at an additional cost.
PolarDB is not listed on *7

You can also set alerts using CloudMonitor.
Actually, CloudMonitor is also available for free, which is great. . . !

summary

This time, I introduced the features and useful functions of PolarDB from an operational perspective.
Although the actual construction steps are not included in this article,
it is necessary to understand the features and functions when using PolarDB for a new project or switching from another RDB, so please
use PolarDB. I would be happy if I could help those who are considering it.
Also, I would like to keep an eye on future updates of PolarDB.

source

*1 https://www.intel.com/content/www/us/en/products/docs/storage/alibaba-cloud-polardb-solution-brief.html
*2 https://www.sbcloud.co.jp /entry/sol/polardb/
*3 https://www.alibabacloud.com/help/ja/doc-detail/68510.htm
*4 https://www.alibabacloud.com/help/doc-detail/169686. htm
*5 https://jp.alibabacloud.com/product/data-transmission-service
*6 https://www.alibabacloud.com/help/ja/doc-detail/68555.htm
*7 https://www .alibabacloud.com/help/ja/doc-detail/68498.htm

If you found this article helpful , please give it a like!
1
Loading...
1 vote, average: 1.00 / 11
1,288
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

The person who wrote this article

About the author

Yuki Teraoka

Joined Beyond in 2016 and is currently in his 6th year as an Infrastructure Engineer
MSP, where he troubleshoots failures while
also designing and building infrastructure using public clouds such as AWS.
Recently, I
have been working with Hashicorp tools such as Terraform and Packer as part of building container infrastructure such as Docker and Kubernetes and automating operations, and I
also play the role of an evangelist who speaks at external study groups and seminars.

・GitHub
https://github.com/nezumisannn

・Presentation history
https://github.com/nezumisannn/my-profile

・Presentation materials (SpeakerDeck)
https://speakerdeck.com/nezumisannn

・Certification:
AWS Certified Solutions Architect - Associate
Google Cloud Professional Cloud Architect