There's a number of tactics you can use - depending upon the time/resources you're willing to commit to the upgrade.
It might be possible, depending upon how you're performing your migration, to do this with absolutely zero down-time.
The more complex your application/site, the more complex the migration strategy may be if you want no downtime.
We've achieved zero down-time migrations by:
- Setting up new server(s) with the new version of the site and database.
- Altering the load-balancer to split traffic into two pools new-app, and old-app.
- Configure load balancers begin sending traffic to the new-app server(s), but keep existing sessions on the old-app server(s)
- New sessions on new-app check to see whether the customer-data has been migrated, and if not - quickly does that.
- Progressively shutting down "old-app" servers as load falls off, upgrading to the new-app, and adding to the new-app load balancer pool.
- As sessions end, the customer data is migrated to the new database.
- As load permits, migrate inactive customer data to the new database.
Of course, this is more complex - as we needed to maintain access to customer data in two environments and progressively migrate.
It does permit us though to roll-back changes should some issue be noticed - eg excessive CPU or Memory usage on one of the new-app servers.
For a smaller site where you don't have the budget for additional servers, you may be able to achieve this by simply using multiple IP Addresses, or some form of internal load-balancing software to route requests to the old, or new site. This can complicate matters more.
If you're not able to run the old app, and new app off the same data store (backend webservices, database, etc) - then your apps would need to be aware that they would need to sync data between old/new - eg during save/update of customer-data, the write would need to occur in both locations.