Design: Parallel Running Deployment System
Design focuses on the deployment and routing architecture for parallel running of microservices. It excludes detailed implementation of microservice business logic and database schema beyond what supports parallel running.
Functional Requirements
FR1: Support running two versions of a microservice simultaneously in production.
FR2: Route a configurable percentage of user requests to the new version while the rest go to the old version.
FR3: Ensure data consistency between versions during parallel operation.
FR4: Allow quick rollback to the old version if issues occur in the new version.
FR5: Monitor performance and errors separately for each version.
FR6: Minimize downtime during deployment and switching.
Non-Functional Requirements
NFR1: Handle up to 10,000 concurrent users with low latency (p99 < 200ms).
NFR2: Availability target of 99.9% uptime (less than 8.77 hours downtime per year).
NFR3: Data consistency must be eventual but with mechanisms to detect divergence.
NFR4: Deployment changes should not cause user-visible errors or downtime.