Question 1
Topic: Topic 701: Software Engineering
Skill tested: Designs service APIs with appropriate statelessness, persistence, and session handling.
A team is extracting order processing from a monolithic retail application into a service that will run in multiple container replicas. The service must survive replica replacement and scale horizontally during seasonal peaks. Current code stores a customer's shopping workflow in process memory and writes completed orders to a relational database. The public API is used by browser and mobile clients, and the team wants to avoid sticky load-balancer sessions. Which design best meets these requirements?
Replicas that may be replaced or scaled independently should not own the only copy of durable state. Keeping orders in the database and placing any required shared workflow state in an external service lets any replica handle a request without sticky routing. A versioned API also supports client evolution. Sticky sessions in A limit effective balancing and do not protect in-memory state from loss. A shared filesystem plus IP routing in C retains coupling without reliable session semantics. Container-local files in D are ephemeral and cannot provide durable order storage.