## Conclusion

Since TiDB servers handle SQL layer connections, performing online upgrades on them is the most challenging compared to upgrading TiKV and PD. This exercise proves that with TiProxy's help, such planned downtime can be circumvented. Before upgrading TiDB servers, they retrieve information from the Placement Driver to identify the server to be upgraded. Prior to this, TiProxy migrates all sessions from the affected server to other TiDB servers. Therefore, one node at a time - until all the TiDB servers are upgraded. Thus, the upgrade of the entire TiDB cluster has been completed without any disruption of client sessions. The database downtime and the application downtime was - zero.

If you're using TiDB Cloud, all these capabilities, including TiProxy's session management, are readily available out of the box. In TiDB Cloud, you can request PingCAP to enable or disable TiProxy for your TiDB cluster.
