The 100-million migration

Global Technology
McDonald’s Technical Blog
3 min readJun 11, 2024

A new microservice architecture is improving the user experience of our Global Mobile App, but implementing it meant moving millions of users to a new platform.

by Kalanidhi Sekar, Software Engineer III

McDonald’s Global Mobile Application (GMA) is one of the most popular mobile apps in the food and restaurant app categories in the U.S.

User registration and authentication is one of the critical functionalities of GMA, allowing users to register, activate, and log in to their accounts, where they can order their favorite food.

For GMA to work for millions of users, we use a microservice architecture in the backend for registration, log in, and maintenance of user profiles in our system.

To use the application, customers are required to create an account.

To provide a simpler user experience, we recently moved to a new authentication system that securely stores and manages user identity information.

In the new system, users can securely register a new GMA account even without a password. They can use their email address, which we validate by sending a verification link to their email address. Once validated, users are logged into our app. If they register a new account using a social media account, they are validated with the social provider’s system, and are then automatically logged into our app.

While all this may sound simple enough, there’s a lot that went on behind the scenes as we transitioned to a new platform.

The great migration
As we decided on the solution and determined our approach (especially given our scope), there were several considerations we had to keep in mind:

  • We had to migrate approximately 100 million users, so the system should support individual records and millions of record migrations.
  • Migration should not disrupt or increase latency, to the end-user experience or functionality, and first-time registration and log in should not be affected. Migration should be decoupled from our main authentication system.
  • Time to migrate users should be fast.
  • User data needs to be secure while it’s transferred.
  • Migrated data accuracy should be 100%. The migration process should not result in data discrepancies between both systems, so data migration could only begin when the new system started receiving user-identity information.

We designed and developed a data migration script, enabling us to trigger data migration ad-hoc in-batch mode without affecting the performance of the overall authentication system.

Migration process

Of note:

  • A migration request can be submitted for specific users, but to migrate millions of users, it’s necessary to submit a range request with start and end values of user identifier to a migration chunk service.
  • A migration chunk service validates user IDs within the submitted range by connecting to our user database and creating sub-requests with 100 users to give to the migration service.
  • The migration service starts migrating users from the old system into the new system as soon as the sub-request arrives. The service also runs 200 instances, which will process sub-requests simultaneously.
  • The migration service retrieves the user identity information from the old system batch and inserts data into the new system.
  • If the migration Lambda cannot find user identity information for a user ID in the old system, then details will record with reason for failure.

With the above process, we were able to migrate user information without affecting end-user functionality. This entire migration process takes 15 minutes to migrate 5 million users successfully.

Once the migration process is completed, we will stop publishing information to the old user identity management system, and our new system will continue to manage and serve user identity information for our GMA app users.

Conclusion
Mobile ordering is McDonald’s fastest-growing ordering channel, and with McDonald’s goal of expanding its active Loyalty user base, ensuring our tech is easy to use and safe is critical. This migration is just one example of how the Global Technology team continuously finds innovative ways to optimize our tech and capabilities.

--

--