AZ-400 exam dumps

AZ-400 practice question 208 of 306

Designing and Implementing Microsoft DevOps Solutions. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AZ-400 Question 208

Select 2

Your organization uses Azure DevOps Pipelines to support continuous integration and frequent code pushes. You have noticed that concurrent pipeline runs consume many hosted agents, leading to increasing costs and occasional queue times. Management wants to lower expenses while maintaining good performance for critical builds. Which two actions can help optimize pipeline concurrency for performance and cost? (Choose two.)

  1. A

    Apply a 'concurrency' limit in the pipeline's YAML to throttle simultaneous runs.

  2. B

    Purchase additional parallel jobs from Microsoft-hosted agents to increase capacity.

  3. C

    Implement a multi-stage pipeline with manual approvals at every stage.

  4. D

    Deploy or leverage self-hosted agents that can scale automatically based on usage.

Show answer and explanation

Correct answers: A, D

Explanation

To optimize concurrency while controlling costs and preserving performance, you can limit the maximum number of concurrent pipeline runs and implement self-managed, autoscaling agents. In Azure DevOps, using the concurrency property in your YAML pipelines allows you to throttle parallel runs ethically; self-hosted agents with autoscaling (either in on-premises servers or in cloud environments like Azure virtual machines) can be brought online only when needed. These approaches follow Azure DevOps best practices and guidance, as documented in Azure Pipelines documentation under 'Pipeline concurrency' and 'Self-hosted agents.'

  • A. Correct.

    Option 1 is correct. Setting a 'concurrency' limit in pipeline YAML (for example, 'concurrency: myLimit') helps control how many instances of a pipeline can run concurrently. This reduces agent usage and cost by preventing excessive parallel runs.

  • B. Incorrect.

    Option 2 is incorrect. While this would increase capacity and reduce queue times, purchasing more parallel jobs directly increases your operational costs and does not inherently optimize concurrency usage.

  • C. Incorrect.

    Option 3 is incorrect. Adding manual approvals for every stage might help control when pipelines run, but it does not efficiently address concurrency or cost reduction in a highly automated environment. It could also introduce unnecessary human intervention, which might slow down development.

  • D. Correct.

    Option 4 is correct. Self-hosted agents that automatically scale up or down based on workload allow you to closely manage costs. You pay only for the underlying infrastructure (for instance, using autoscaling in Azure VMs), which can be more cost-effective than constantly running multiple hosted agents.

Timed practice exam

Take a AZ-400 practice test under exam conditions

70 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam