Interview Prep/Ansible/Performance and Scale

How do you scale Ansible to thousands of hosts?

AdvancedProductionPerformance and Scale
Answer

Do not fix it with just one big controller:

  1. Tune the basics: pipelining, ControlPersist, caching, fewer tasks, async.
  2. Split the work: run per environment, per region or per tier in parallel pipeline jobs with --limit.
  3. Distribute execution: AAP automation mesh or several AWX execution nodes and instance groups close to the hosts (per region/datacenter), with hop nodes for isolated networks.
  4. Use pull mode (ansible-pull) for autoscaled or very large fleets that configure themselves, with a central repo.
  5. Shrink the problem: bake images so that day-to-day runs configure little.

Watch controller memory (each fork costs RAM), inventory sync time, and the load your automation puts on shared services such as mirrors and APIs.

All Ansible questions Roadmap: Ansible

More on Performance and Scale