Multi-Instance Deployment
Run several instances to share requests, but keep users logged in when their next request reaches another instance.
Run several instances to share requests, but keep users logged in when their next request reaches another instance.
Multiple replicas of one service share traffic.
Multiple instances share requests and offer takeover: An entry point can route requests to several equivalent service instances; when one is maintained or fails, other healthy instances may continue serving traffic. Verify replica count and routing against the service goal instead of trusting a deployment page that merely lists processes.
Cross-request state cannot hide in one instance: If a user's first request reaches instance-a and the next reaches instance-b, b cannot identify the user when the session exists only in a's memory. Put session state and similar data in shared or external storage, then route the same user to different instances and verify the session remains valid. This still does not prove database high availability or correct business coordination.
Scheduled reports reveal another multi-instance issue: After a daily-report service scales to multiple instances, each instance may trigger the same report at the same time. Coordinate through a shared task record or a single-execution rule so the report is not generated and sent more than once.
Deploy this stateless web service with multiple instances and confirm the entry point can send requests to any healthy instance. Inspect state that must survive across requests, such as login sessions and upload progress; do not keep it only in one instance's memory. After the change, send the same user's requests to different instances and verify the session remains valid. Also state which database high-availability and coordination problems this multi-instance setup does not solve automatically.