Storage-Layer Data Migration for Zero-Downtime Client Switching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional data migration methods require service interruption and shutdown, leading to a time gap that affects user experience and can cause significant business disruptions, especially with large data volumes.
Innovation Solution
A data migration method that allows for imperceptible data migration by writing and acquiring data in a target storage layer while switching clients, using a proxy server to access data from the original storage cluster when needed, ensuring seamless data transfer without interruption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional data migration method is used with service interruption, then data migration can be completed, but user experience deteriorates and business disruption occurs
Solution Approach 1:
The system performs preliminary data copying from the first storage layer to the second storage layer before the actual client switch occurs. This preliminary action ensures that data is ready for immediate access after switching, eliminating migration delays and maintaining service availability throughout the process.
Solution Approach 2:
A proxy server is introduced as an intermediary component that manages data access during the migration process. The proxy server redirects read requests to the appropriate storage layer based on the current client state, enabling seamless transition between storage layers without service interruption.
2Reliability
If data migration is performed with large data volumes, then complete data transfer is achieved, but migration time increases significantly
Solution Approach 1:
Data copying is performed in advance during idle periods or in parallel with normal operations, so that when client switching occurs, the data is already prepared and ready for immediate use, regardless of data volume.
Solution Approach 2:
The system maintains continuous data access throughout the migration process by keeping both storage layers active and using the proxy server to route requests appropriately, ensuring that data migration does not interrupt normal data operations.
3Adaptability or versatility
If client switching is implemented without data preparation, then client change is achieved, but data access failures occur
Solution Approach 1:
The system completes data copying to the target storage layer before the client switch occurs, ensuring that data is prepared and verified ready for access immediately after switching, preventing any data access failures.
Solution Approach 2:
The system implements verification mechanisms to confirm data integrity and completeness before allowing client switching, providing feedback that ensures data readiness and preventing switches that would result in access failures.
Data Source
Figure 1
Figure 2~3
Figure 4~5
AI summary
Disclosed are a data migration method and apparatus based on data storage, a server, and a storage medium, which relate to the technical field of data processing. The method comprises: after receiving a data write request, writing to-be-written data that is included in the data write request into a target storage layer (110), wherein the data write request is sent by a current client after a terminal device changes the current client from a first client to a second client; after receiving a data acquisition request and in a case where it is determined that target data corresponding to the data acquisition request does not exist in the target storage layer, acquiring the target data in a data storage cluster corresponding to the first client, and writing the target data into the target storage layer (120), wherein the data acquisition request is sent by the current client; and sending the target data to the current client (130).