What is the recommended approach for handling server reboots in a TiDB cluster? #66495
Replies: 3 comments
|
Original author: TiDB-AI-Assistant You are correct to be concerned about the order of starting TiDB services after a server reboot. The order is crucial for maintaining the integrity and consistency of your cluster. Here’s the recommended order, along with why it’s important:
It is highly recommended to use a startup script on each server to automate the process. This ensures consistent and reliable restarts. Here’s a basic example:
Remember to tailor this script to your specific needs, including:
This automated approach ensures that your TiDB cluster services are started in the correct order even during unplanned server reboots, minimizing downtime and maximizing cluster stability. |
|
Original author: dveeden This depends on the deployment method. Is this cluster deployed with “tiup cluster” or with the TiDB Operator for Kubernetes? Or if it is really old maybe with ansible? |
|
Original author: marvelfan Hi, This is a pretty old legacy cluster that won’t be around for much longer, it was originally deployed around 6 years ago using Ansible. I believe this was the repository used: GitHub - pingcap/tidb-ansible So we’re looking to make sure if a server it’s running on needs to be rebooted for maintenance we can effectively stay or get back into a running state. And to determine if utilizing on reboot startup scripts to restart the services would be a recommended path to take. |
Uh oh!
There was an error while loading. Please reload this page.
Original author: marvelfan
Original time: 2024-06-17 23:13:14.949303
Original ID/Slug: 946 / what-is-the-recommended-approach-for-handling-server-reboots-in-a-tidb-cluster
Application environment:
Development
TiDB version:
Unsure
Reproduction method:
Problem:
I have a very old legacy TiDB cluster we inherited across multiple servers, I see that there are a few different services like PD, TiKV, and TiDB. Using systemctl start service we started services on each server.
In the event one of the servers has to be rebooted for maintenance what is the correct order in which to start the TiDB services? And is it recommended to use some kind of startup script on the specific server so we could automate it?
Resource allocation:
N/A
Attachment:
N/A
All reactions