CompTIA certification · Exam CV0-004

CV0-004 Mock Exam Page 8

CompTIA Cloud+

Free CV0-004 mock exam questions 71–76, each with the answer and an explanation.

20 questions · 20 minutes · free, no sign-up

Free CV0-004 questions

71–76 of 76 free
Question 71 Choose 1
Which of the following is the most cost-effective and efficient strategy when migrating to the cloud?
Show answerHide answer

Correct answer: A Retire

Explanation

Explanation:

The most cost-effective and efficient strategy when migrating to the cloud is Retire (also known as decommissioning or sunsetting).
Retire involves identifying applications, systems, or workloads that are no longer needed, used, or providing business value and simply turning them off (decommissioning them) instead of migrating them.

Cost-effectiveness: You avoid all migration costs, ongoing cloud compute/storage/network charges, licensing, maintenance, and operational overhead for that workload.
Efficiency: It requires the least time, effort, and risk. Many organizations discover during migration assessments that 10–30% (or more) of their applications can be retired, immediately simplifying the project and reducing total spend.

This is a core part of application portfolio rationalization in cloud migrations.

Why the other options are less cost-effective/efficient:
B. Replatform:
- Move the application to the cloud with some optimizations (e.g., lift-and-shift to managed services).
- Offers moderate benefits but still requires migration effort and ongoing costs.

C. Retain:
- Keep the application running on-premises (or as-is).
- Avoids immediate migration costs but continues high on-premises expenses (hardware, power, staffing) and misses cloud advantages.

D. Refactor:
- Completely re-architect or rewrite the application to be cloud-native (e.g., microservices).
- Delivers the greatest long-term value and scalability but is the most expensive and time-consuming option due to development, testing, and potential risks.

Key Takeaway for CV0-004 (Cloud+)
This question covers Domain 1.0: Cloud Concepts and Architecture — specifically the 6 Rs of cloud migration (Rehost, Replatform, Refactor/Rearchitect, Repurchase, Retain, Retire).
CompTIA Cloud+ stresses that a smart migration starts with rationalization: Retire unnecessary workloads first for quick wins in cost savings and reduced complexity. Refactor is powerful for innovation but costly; Retire is the cheapest and fastest when an application has no ongoing value.

References:
- CompTIA Cloud+ (CV0-004) exam objectives: Cloud migration strategies (the 6 Rs).
- Industry standard frameworks (AWS, Gartner, etc.): Retiring legacy/unused systems is highlighted as a top cost-saving opportunity during migration planning.
Question 72 Choose 1
A company uses containers to implement a web application. The development team completed internal testing of a new feature and is ready to move the feature to the production environment. Which of the following deployment models would best meet the company's needs while minimizing cost and targeting a specific subset of its users?
Show answerHide answer

Correct answer: A Canary

Explanation

Explanation:

The development team has completed internal testing and wants to move a new feature to production while minimizing cost and targeting a specific subset of users.

A canary deployment releases the new feature to a small subset of users first before rolling it out to the entire user base. This approach allows the team to validate the feature in production with real traffic while limiting the impact if issues arise. It minimizes cost because only a small number of containers or instances need to be deployed initially for the canary group, rather than maintaining two full production environments. Targeting a specific subset of users is a core characteristic of canary deployments, often achieved through load balancer rules, user segmentation, or feature flags.

Why the other options are incorrect:
B. Blue-green deployment:
- Requires maintaining two identical production environments (blue for current, green for new) and switching traffic between them.
- While this provides a clean rollback mechanism, it doubles infrastructure cost during the transition and does not inherently target a specific subset of users—traffic is switched all at once or gradually but typically not segmented for selective user exposure.

C. Rolling deployment:
- Updates instances gradually in batches behind a load balancer.
- While it avoids downtime, it affects all users progressively rather than targeting a specific subset. It does not provide the controlled, user-segmented validation that canary deployments offer.

D. In-place deployment:
- Updates the existing environment directly, often stopping the application or replacing it in place.
- This typically causes downtime or performance degradation, does not allow targeting a subset of users, and provides no ability to test with a small group before full release.

References:
- CompTIA Official Exam Objectives for Cloud+ CV0-004:
- Domain 2.0: Deployment
- 2.4 Given a scenario, perform cloud resource deprovisioning and migration tasks. Deployment strategies include canary, blue-green, and rolling.
- 2.5 Given a scenario, implement continuous integration and continuous delivery (CI/CD) in a cloud environment. Includes deployment strategies and their appropriate use cases.
Question 73 Choose 1
A cloud engineer needs to deploy a new version of a web application to 100 servers. In the past, new version deployments have caused outages. Which of the following deployment types should the cloud engineer implement to prevent the outages from happening this time?
Show answerHide answer

Correct answer: C Canary

Explanation

Explanation:

The key concern is:
- Previous deployments caused outages
- The engineer wants to prevent outages during deployment

The best approach is Canary Deployment.

👉 Canary deployment works by:
- Releasing the new version to a small subset of servers/users first
- Monitoring for issues (errors, performance, failures)
- Gradually rolling out to the rest if everything is stable

This minimizes risk because:
- If something breaks, only a small portion of users is affected
- The rollout can be stopped quickly

❌ Why the other options are wrong
A. Rolling:
- Updates servers in batches
- Still exposes a large portion of users at once compared to canary

B. Blue-green:
- Switches all traffic at once
- Fast, but if something goes wrong → full outage risk

D. Round-robin:
- Load balancing method, not a deployment strategy

🧠 Exam Tip
Look for these clues:
- “Prevent outages”
- “Test before full rollout”
- “Minimize impact”

➡️ Choose Canary deployment

If the question instead said “instant switch” or “two environments,” then it would be Blue-Green.
Question 74 Choose 1
An organization's critical data was exfiltrated from a computer system in a cyberattack. A cloud analyst wants to identify the root cause and is reviewing the following security logs of a software web application:

"2021/12/18 09:33:12" "10. 34. 32.18" "104. 224. 123. 119" "POST /
login.php?u=administrator&p=or%201%20=1"
"2021/12/18 09:33:13" "10.34. 32.18" "104. 224. 123.119" "POST /login.
php?u=administrator&p=%27%0A"
"2021/12/18 09:33:14" "10. 34. 32.18" "104. 224. 123. 119" "POST /login.
php?u=administrator&p=%26"
"2021/12/18 09:33:17" "10.34. 32.18" "104. 224. 123.119" "POST /
login.php?u=administrator&p=%3B"
"2021/12/18 09:33:12" "10.34. 32. 18" "104. 224. 123. 119" "POST / login.
php?u=admin&p=or%201%20=1"
"2021/12/18 09:33:19" "10.34.32.18" "104. 224. 123.119" "POST / login.
php?u=admin&p=%27%0A"
"2021/12/18 09:33:21" "10. 34. 32.18" "104.224. 123.119" "POST / login.
php?u=admin&p=%26"
"2021/12/18 09:33:23" "10. 34. 32.18" "104. 224. 123.119" "POST / login.
php?u=admin&p=%3B"

Which of the following types of attacks occurred?
Show answerHide answer

Correct answer: A SQL injection

Explanation

Explanation:

The logs show repeated attempts to log in with suspicious query strings such as:

- p=or 1=1 → This is a classic SQL injection payload, designed to bypass authentication by making the condition always true.
- Other entries like p=%27 (single quote), p=%3B (semicolon), and p=%26 (ampersand) are typical SQL injection probes used to test how the database handles special characters.

This pattern indicates the attacker was trying to manipulate the SQL query behind the login form to gain unauthorized access and eventually exfiltrate data.

❌ Incorrect Options
B. Cross-site scripting (XSS):
- Would involve injecting JavaScript or HTML tags, not SQL operators.

C. Reuse of leaked credentials:
- Would show normal login attempts with valid usernames/passwords, not injection strings.

D. Privilege escalation:
- Happens after gaining access, not at the login stage.

🔗 Reference:
- Domain 4.0 Security → Web application attacks (SQLi, XSS, credential theft).
- Domain 5.0 Cloud Operations → Log analysis for root cause identification.

💡 Exam Tip
- When you see OR 1=1 in logs, the answer is SQL injection.
- If you see <script> tags, it’s XSS.
- If you see valid usernames/passwords being reused, it’s credential theft.
- If you see privilege escalation, it’s usually after login, not during.
Question 75 Choose 2
Which of the following will best reduce the cost of running workloads while maintaining the same performance? (Select two).
Show answerHide answer

Correct answer: A, C Instance sizeReserved resources model

Explanation

Explanation

The goal is to reduce the cost of running workloads while maintaining the same performance. Two strategies directly address this: selecting the appropriate instance size to avoid over-provisioning, and committing to a reserved resources model to obtain significant discounts compared to on-demand pricing.

A. Instance size
- Selecting the correct instance size ensures that workloads are not over-provisioned with more CPU, memory, or other resources than they actually need. Running an oversized instance wastes money without improving performance, while right-sizing to match actual resource consumption reduces cost while maintaining the same performance level. Cloud providers offer a wide range of instance families and sizes, allowing administrators to match capacity precisely to workload requirements.

C. Reserved resources model
- Reserved instances or capacity reservations commit to using a specific amount of resources for a one-year or three-year term in exchange for substantial discounts (typically 30% to 60% or more compared to on-demand pricing). This model does not change performance—the underlying resources are the same—but significantly reduces cost for steady-state, predictable workloads. It is one of the most effective ways to lower cloud costs while maintaining identical performance characteristics.

Why the other options are incorrect
B. Tagging
- Tagging is a metadata labeling practice used for organization, cost allocation, and resource management. While tagging helps track and manage costs, it does not directly reduce costs. It enables better visibility but does not change the pricing model or resource sizing.

D. Spot instance model
- Spot instances (or preemptible VMs) offer deep discounts but come with the risk of termination when cloud providers need the capacity back. While they reduce cost, they do not guarantee the same performance consistency because workloads can be interrupted. This model is suitable for fault-tolerant or batch workloads, not for maintaining guaranteed, uninterrupted performance.

E. Pay-as-you-go model
- Pay-as-you-go (on-demand) provides flexibility with no long-term commitment but is the most expensive pricing model per unit of resource. It does not reduce cost compared to reserved models; it is typically used for variable or short-term workloads where commitment is not feasible.

F. Dedicated host model
- Dedicated hosts provide single-tenant physical servers for compliance or licensing requirements. This is generally more expensive than multi-tenant virtualized options and does not reduce cost. It is used for specific regulatory or software licensing needs, not as a cost-saving measure.

References
- CompTIA Official Exam Objectives for Cloud+ CV0-004:
- Domain 1.0: Cloud Architecture and Design
- 1.6 Given a scenario, optimize cloud resource utilization and costs.
- Includes right-sizing instances, selecting appropriate pricing models (on-demand, reserved, spot), and using tagging for cost allocation.
Question 76 Choose 1
A cloud solution needs to be replaced without interruptions. The replacement process can be completed in phases, but the cost should be kept as low as possible. Which of the following is the best strategy to implement?
Show answerHide answer

Correct answer: B Rolling

Explanation

Explanation:

Rolling deployment is a strategy where the new version of a system or service is gradually deployed across servers or nodes, replacing the old version in phases.
This approach ensures that the system remains available, because not all instances are updated at the same time, avoiding downtime.
It is cost-effective compared to blue-green deployments because it does not require a full duplicate environment (like blue-green does).
Rolling updates are common in cloud environments, especially when updating VMs, containers, or application clusters.

Why the other options are less suitable:

A. Blue-green
Blue-green deployment involves duplicating the entire environment (blue = old, green = new) and switching traffic after full testing.
Pros: near-zero downtime.
Cons: high cost due to maintaining two full environments.
Not optimal here because the question emphasizes keeping cost low.

C. In-place
In-place deployment updates the existing systems directly.
Pros: cheap, no duplicate resources needed.
Cons: higher risk of downtime or failure during deployment, which violates the "without interruptions" requirement.

D. Canary
Canary deployment releases the new version to a small subset of users before a full rollout.
Pros: safe testing.
Cons: more complex traffic management and partial deployment might not be sufficient for cost reduction or full phased replacement.

Reference:
CompTIA Cloud+ CV0-004 Exam Objectives: Deployment models and strategies, including rolling, blue-green, and canary deployments.

That's the last free question

You've seen the free 30% (76 of 256 questions). Full access unlocks every question and full-length CV0-004 mock exams (90 questions, 90 minutes), a different mock on every attempt.

Unlock full mock exam
Full mock exam

Sit the CV0-004 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real CV0-004 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full CV0-004 mock exam
  • 90questions per mock
  • 90 mintime limit
  • 256questions in the bank
  • Newmock on every attempt