Background information
It is recommended that auto-reconnect is supported in your application connection to the database so that higher availability can be provided. When database switch or migration happens, the application will, without human intervention, be automatically restored.
Moreover, since the short connection consumes a lot of performance and resources, persistent connection is recommended for connecting to the database.