Cloud and Container Basics

Which of the following is an appropriate way to update the software on production servers in line with the idea of immutable infrastructure?

  1. ALog in to the running production servers with SSH, update the packages and then restart the service
  2. BCreate new servers from a new image that includes the update, switch over to them, and discard the old servers without modifying them
  3. CRewrite the configuration files by hand without stopping the production servers, and record the changes in a work log
Show answer and explanation

Answer: B. Create new servers from a new image that includes the update, switch over to them, and discard the old servers without modifying them

With immutable infrastructure, servers (virtual machines or containers) are never modified once created; when a change is needed, new ones are created from an image that includes the change and swapped in. Because every server is created from the same image, configurations do not drift apart from server to server through accumulated manual differences. When a problem occurs, recreating from the previous image restores the old state. Anything that must be kept, such as logs and data, is stored in storage or databases outside the servers.

  • A. This modifies running servers directly and causes the state of each server to drift.
  • B. Correct. Changes go into the image, and whole servers are replaced.
  • C. Even with a record, the running servers are still changed by hand, which is not the immutable approach.
Practice this topic Back to topic

Books on Cloud and Container Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Cloud and Container Basics questions

  1. Two environments with the same configuration as production are prepared; the current version keeps running in one while the new version is installed and checked in the other, and then the load balancer is switched over to it all at once. If there is a problem, switching back quickly returns to the old version. Which of the following is this release method?
  2. A service that receives 12,000 requests per hour performs a canary release of a new version, sending only 5% of the requests to it. The new version has a bug that makes 3% of the requests it receives fail; it is noticed after one hour, and all requests are returned to the old version. Which of the following is the number of requests that failed because of the bug during that hour?
  3. A container image built by a CI/CD pipeline was tested in the staging environment and passed. Which of the following is the most appropriate way to release this image to production?
  4. As shown above, the database connection target is not written into the image but passed as an environment variable when the container starts. Which of the following is the most appropriate main advantage of this design?
  5. In a system in which several services work together, you want to find out which services a single user request passed through, in what order, and how much time it spent in each. Among the data used for observability, which of the following is the most suitable?