# Akka streams in containers

**URL:** https://discuss.akka.io/t/akka-streams-in-containers/8608
**Category:** Akka Libraries
**Created:** [August 8, 2021, 11:03am UTC](https://discuss.akka.io/t/akka-streams-in-containers/8608 "2021-08-08T11:03:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![flo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/flo/32/1878_2.png) [@flo](https://discuss.akka.io/u/flo)
#### Post date: [August 8, 2021, 11:03am UTC](https://discuss.akka.io/t/akka-streams-in-containers/8608/1 "2021-08-08T11:03:58Z")

</div>

Hi,

Does it make sense to run a simple akka stream application containerized and spawn 30 instances of this container: this means 30 instances of the akka actorsystem are running in different containers. Is this an antipatern for akka? What is the right way to deploy ~30/many instances of the same (small) stream application on different nodes? Could you point me to a good reference/documentation for this?

---

<div class="post-metadata">

### Author: ![davidogren](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/davidogren/32/917_2.png) [@davidogren](https://discuss.akka.io/u/davidogren)
#### Post date: [August 10, 2021, 2:12pm UTC](https://discuss.akka.io/t/akka-streams-in-containers/8608/2 "2021-08-10T14:12:41Z")

</div>

> Does it make sense to run a simple akka stream application containerized and spawn 30 instances of this container: this means 30 instances of the akka actorsystem are running in different containers.

Probably makes sense. Obviously depends on what you are consuming from and producing to, but for something like Kafka (just as an example) that can handle multiple consumers/producers effectively, yes, it’s a good strategy.

> Is this an antipatern for akka?

Not in the general case, no. As I mention in the next answer, that is specifically what Akka Data Pipelines is designed to do, so it’s arguably a documented best practice.

> What is the right way to deploy ~30/many instances of the same (small) stream application on different nodes? Could you point me to a good reference/documentation for this?

Again, it might depend on the details. But what you are describing sounds a lot like a typical use case for [Akka Data Pipelines](https://developer.lightbend.com/docs/cloudflow/current/index.html).

---

<div class="post-metadata">

### Author: ![flo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/flo/32/1878_2.png) [@flo](https://discuss.akka.io/u/flo)
#### Post date: [August 17, 2021, 7:11pm UTC](https://discuss.akka.io/t/akka-streams-in-containers/8608/3 "2021-08-17T19:11:34Z")

</div>

Alright, thanks a lot. Yes the use case is consuming / producing to kafka.
