CompTIA

CV0-004 practice question 16

CompTIA Cloud+ · free question 16 of 20

Question

A developer is testing code that will be used to deploy a web farm in a public cloud. The main code block is a function to create a load balancer and a loop to create 1,000 web servers, as shown below: ```python my_load_balancer() for x in range(1000): my_web_server() ``` The developer runs the code against the company's cloud account and observes that the load balancer is successfully created, but only 100 web servers have been created. Which of the following should the developer do to fix this issue?
  • A. Request an increase of instance quota. Correct
  • B. Run the code multiple times until all servers are created.
  • C. Check the my_web_server() function to ensure it is using the right credentials.
  • D. Place the my_load_balancer() function after the loop.

Explanation

Cloud providers enforce per-account service quotas on resources such as instances or vCPUs, and once the limit is reached further create requests fail, which explains why creation stopped at exactly 100 servers. Requesting a quota increase lets the loop complete. Rerunning the code hits the same limit, wrong credentials would have stopped every server from being created, and moving the load balancer call does not affect how many servers can be launched.

Need the theory? Learn it free in the CV0-004 course on Godlike Academy

Practice the whole free set

Answer all 20 free CV0-004 questions with instant feedback, or unlock all 309 questions with Learn and Exam modes.