System Architecture and Reliability
Which is generally a desirable design for a system that uses autoscaling to add and remove servers automatically according to the load?
- AStoring business data that only that server holds on each server's local disk
- BStoring users' session information in a shared data store instead of each server's memory, so that the result is the same whichever server processes a request
- CWhen reducing the number of servers, stopping a server immediately even if it has requests in progress
Show answer and explanation
Answer: B. Storing users' session information in a shared data store instead of each server's memory, so that the result is the same whichever server processes a request
With autoscaling, a design in which servers hold no state of their own (stateless) is desirable, so that it does not matter when servers are added or removed. If session information and business data are kept in a shared data store, any server can process a request in the same way, and no data is lost when servers are removed. When reducing the number of servers, new requests stop being distributed to a server and it is stopped only after its requests in progress have finished.
- A. When the number of servers is reduced, that server's data is lost.
- B. Correct. Making servers stateless lets them be added and removed freely.
- C. Requests in progress would fail. Stop distributing to the server and wait for the processing to finish before stopping it.
Continue: 9 more System Architecture and Reliability questions