
Spin up a Serverless database with 25GiB free resources.
Unlike commercial sites, government and public organization websites prioritize constant accessibility over peak performance. Facing around-the-clock citizen access demands, Nagoya City’s websites, such as Kokoro’s Bandaid (a mental health consultation portal), Gatekeeper Training (a mental health training portal), and Nagoya Food Education Plaza, needed a solution to guarantee website resilience despite typically not experiencing high traffic spikes.
Figure 1. Kokoro’s Bandaid
AJU Independence House Wadachi Computer House (AJU) is responsible for developing and operating these websites. To seek a reliable solution to ensure citizens could access services and information anytime, AJU adopted TiDB Serverless, a fully managed Database as a Service (DBaaS) solution from PingCAP as the backend database.
How did AJU implement high availability by moving to the cloud? Why did they choose TiDB Serverless over the standard MySQL? We delve into these questions with Makoto Mizutani, the migration project leader, and Lepe Alberto, AJU’s technical consultant.
According to Mr. Mizutani, the websites for Nagoya City needed to be unstoppable with the following requirements:
When migrating to the cloud, they initially compared AWS and Google Cloud, ultimately choosing AWS.
The team used Docker Swarm to cluster WordPress on Docker containers across three availability zones to enhance WordPress’s availability. This ensures that even if one WordPress instance fails, the others remain unaffected to maintain overall operation.
However, achieving high availability for WordPress requires the database it connects to also have high availability.
Initially, Mr. Mizutani and his team chose Amazon Aurora MySQL, a trusted database service from AWS, as their backend database. It offers sufficient performance and stability for many applications.
However, TiDB Cloud, a MySQL-compatible database service on AWS, caught Mr. Alberto’s eye because of its cost-effectiveness. Upon further testing, they chose TiDB Serverless, the serverless option of TiDB Cloud, for the following reasons:
Before settling on TiDB Serverless, they also compared it with TiDB Dedicated, the dedicated tier of TiDB Cloud with which they can specify the number of nodes for performance. With TiDB Serverless, nodes automatically adjust based on demand, which makes it sufficiently capable of meeting AJU’s requirements.
One issue with adopting TiDB Serverless was the difference in version between the MySQL supported by WordPress and the MySQL version compatible with TiDB Serverless.WordPress supports MySQL version 8.0 and above, and TiDB Cloud is compatible with version 5.7. This required template changes on WordPress to accommodate this version difference.
Mr Alberto took the lead in this task and managed to accommodate the version difference by changing the templates on WordPress.
The cloud migration of the three websites began in April 2023, followed by the testing of TiDB Cloud in May and the integration of TiDB Serverless in June. The team successfully completed the migration in September.
Mr. Mizutani envisioned migrating Nagoya City’s websites to the cloud and bringing AJU’s website and email servers under the same umbrella.
“Next year marks the 40th anniversary of AJU, where we offer opportunities for able-bodied and disabled individuals to work together. Many workplaces for the disabled involve manual labor, and there are few opportunities for intellectual work like at AJU,” Mr. Mizutani shared, “we want to continue to inspire others to follow suit.”
PingCAP, the company behind TiDB Serverless, connected with AJU’s mission. Recognizing the unique value AJU brings, they went above and beyond, offering complimentary technical support beyond the usual scope.
“AJU Independence House is an organization aiming for the independence of people with disabilities. We believe we are a unique entity among organizations using TiDB. For example, Wadachi Computer House, part of AJU, provides a workplace for individuals with severe disabilities, including those who have acquired disabilities later in life and are learning IT skills from scratch to engage in work.
In progressing projects with members from diverse backgrounds, TiDB Serverless has been incredibly helpful as a solution that meets our requirements, allowing for easy and affordable use without the need for specialized database knowledge. We are very grateful for the meticulous support provided by PingCAP
Original Publisher: Publickey -「止まらないWebサイトを構築せよ。名古屋市からの要請にWordPressとDocker Swarm、そしてTiDB Serverlessの組み合わせで対応」
Published Date: Jan 22, 2024
Spin up a Serverless database with 25GiB free resources.