# Scaling Ansible

**URL:** <https://forum.ansible.com/t/scaling-ansible/24243>\
**Category:** Ansible Project\
**Created:** [April 19, 2017, 1:21am UTC](https://forum.ansible.com/t/scaling-ansible/24243 "2017-04-19T01:21:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fong\_Yang](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@Fong\_Yang](https://forum.ansible.com/u/Fong_Yang)\
**Post date:** [April 19, 2017, 1:21am UTC](https://forum.ansible.com/t/scaling-ansible/24243/1 "2017-04-19T01:21:45Z")

</div>

We’re evaluating Ansible and other config management tools. I have two issues I would like input from others:

1. if you have to change ssh keys, what’s the best way to do that across tens of thousands of machines?

2. if you have tens of thousands of servers under Ansible management, how do scale this to do them all quickly? Ideally, I want to be able run through a playbook across several thousand systems at once (assuming the playbooks will not be downloading additional packages from other hosts). Would be great if Ansible could have multiple controlling hosts but I don’t think this is feature.

Your input is appreciated.

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [April 19, 2017, 1:25pm UTC](https://forum.ansible.com/t/scaling-ansible/24243/2 "2017-04-19T13:25:40Z")

</div>

Fong

1. There are various key management tools, all have their purpose. In CoreOS you could use cloudconfig/cloudinit for example. You can also use Ansible in raw mode to install the keys if needed in a bootstrap method.

2. Ansible is used in large sites to control great numbers of hosts. I recall several talks from Rackspace siting the running of a single playbook on thousands of hosts some years back now. If you are looking at this, pooling the work will help control the impact at scale of the playbooks.

Ansible is a great tool and I hope it fits your needs.

---

<div class="post-metadata">

**Author:** ![Fong\_Yang](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@Fong\_Yang](https://forum.ansible.com/u/Fong_Yang)\
**Post date:** [April 19, 2017, 6:00pm UTC](https://forum.ansible.com/t/scaling-ansible/24243/3 "2017-04-19T18:00:35Z")

</div>

Thanks for the comments. I would be interested to see how others scale out the control node(s). Obviously you can run the playbooks in batches, but this could still take a very long time to execute across tens of thousands of hosts. Plus, if the batch is too large it would overwhelm the control node. Would be nice to see how others are solving this problem.

---

<div class="post-metadata">

**Author:** ![Greg\_DeKoenigsberg1](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Greg\_DeKoenigsberg1](https://forum.ansible.com/u/Greg_DeKoenigsberg1)\
**Post date:** [April 19, 2017, 6:10pm UTC](https://forum.ansible.com/t/scaling-ansible/24243/4 "2017-04-19T18:10:32Z")

</div>

> Thanks for the comments. I would be interested to see how others scale out  
> the control node(s). Obviously you can run the playbooks in batches, but  
> this could still take a very long time to execute across tens of thousands  
> of hosts. Plus, if the batch is too large it would overwhelm the control  
> node. Would be nice to see how others are solving this problem.

If you are actually managing tens of thousands of hosts, you're  
probably dealing with other issues that would make it worth your while  
to consider buying Ansible Tower.

--g

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [April 19, 2017, 6:11pm UTC](https://forum.ansible.com/t/scaling-ansible/24243/5 "2017-04-19T18:11:07Z")

</div>

"""Asynchronous Actions and Polling  
By default tasks in playbooks block, meaning the connections stay open  
until the task is done on each node. This may not always be desirable, or  
you may be running operations that take longer than the SSH timeout.

The easiest way to do this is to kick them off all at once and then poll  
until they are done.

You will also want to use asynchronous mode on very long running operations  
that might be subject to timeout."""

---

<div class="post-metadata">

**Author:** ![Fong\_Yang](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@Fong\_Yang](https://forum.ansible.com/u/Fong_Yang)\
**Post date:** [April 19, 2017, 6:17pm UTC](https://forum.ansible.com/t/scaling-ansible/24243/6 "2017-04-19T18:17:26Z")

</div>

I read about that briefly yesterday. Thanks. Will need to read up more about this mode to see how the coordination works. I guess you just keep pulling at the end of all the batches?

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 19, 2017, 6:27pm UTC](https://forum.ansible.com/t/scaling-ansible/24243/7 "2017-04-19T18:27:45Z")

</div>

You may also want to look at [https://www.slideshare.net/JesseKeating/ansiblefest-rax](https://www.slideshare.net/JesseKeating/ansiblefest-rax)

It’s a little old, but talks about managing thousands of servers with Ansible.
