System Design - Tap Compare
From the ByteByteGo post on Reddit Comments migration:
Reddit used a testing technique called “tap compare” for read migrations. The concept is straightforward:
- A small percentage of traffic gets routed to the new Go microservice.
- The new service generates its response internally.
- Before returning anything, it calls the old Python endpoint to get that response too.
- The system compares both responses and logs any differences.
- The old endpoint’s response is what actually gets returned to users.
This approach meant that if the new service had bugs, users never saw them. The team got to validate their new code in production with real traffic while maintaining zero risk to user experience.
Other references that I have found on this topic: