When your application is hosted across multiple servers, maintaining session information consistency can be challenging.
For example, if your legacy application is served on a different domain than your new application, the HTTP session cookies will not be shared between the two. If the data that you need to share is not easily calculable and derivable, you will need a central session store as in the use cases below:
- Using cookies for storing user specific data such as last login time and recent viewed items
- Using cookies for tracking the number of items added to the cart
If you are not currently using a central session store for persisting sessions or are considering moving to one, you can use Vercel KV.
By pointing your domain to Vercel at the start of migration, all your traffic gets directed to Vercel, affecting your bandwidth usage. Be sure to account for potential additional costs associated with this approach.
Minimize risk and perform A/B testing by combining your migration by feature with a user group strategy. You can use Edge Config to store user group information and Edge Middleware to direct traffic appropriately.
- Review our Edge Config feature flag template for a deeper understanding of this approach
- You can also consult our guide on A/B Testing on Vercel for implementing this strategy
This allows for the implementation of small, specific, and independent functionality units triggered by events, potentially enhancing future performance and reducing the risk of breaking changes. However, it may require refactoring your existing code to be more modular and reusable.
Prevent the loss of indexed pages, links, and duplicate content when creating rewrites to direct part of your traffic to the new Vercel deployment. Consider the following:
- Write E2E tests to ensure correct setting of canonical tags and robot indexing at each migration step
- Account for existing redirects and rewrites on your legacy server, ensuring they are thoroughly tested during migration
- Maintain the same routes for migrated feature(s) on Vercel