# Relation between app process count and rack instance count

**URL:** <https://community.convox.com/t/relation-between-app-process-count-and-rack-instance-count/69>\
**Category:** Rack (Version 2)\
**Created:** [February 8, 2019, 4:01pm UTC](https://community.convox.com/t/relation-between-app-process-count-and-rack-instance-count/69 "2019-02-08T16:01:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/ali/32/15_2.png) [@ali](https://community.convox.com/u/ali)\
**Post date:** [February 8, 2019, 4:01pm UTC](https://community.convox.com/t/relation-between-app-process-count-and-rack-instance-count/69/1 "2019-02-08T16:01:13Z")

</div>

Hi,

Is there a relation between how many processes an application can scale up to and the number of EC2 instances therefore the rack must have?

My guess is if an app is scaled to X number of processes (containers), you need at least X+1 EC2 instances in order to deploy one container per instance + a free instance to be able to deploy a new version without downtime. Is my assumption true?

Is it possible to have equal or even less EC2 instances in a rack compared to an app’s process count? What are the implications of it? Is it true that a single EC2 cannot contain two processes for the same app? If so, why is that? What’s the limiting factor?

I’d appreciate some clarification around this topic please.

Thank you.

---

<div class="post-metadata">

**Author:** ![ali](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/ali/32/15_2.png) [@ali](https://community.convox.com/u/ali)\
**Post date:** [February 18, 2019, 7:51am UTC](https://community.convox.com/t/relation-between-app-process-count-and-rack-instance-count/69/2 "2019-02-18T07:51:10Z")

</div>

Any comments please?

---

<div class="post-metadata">

**Author:** ![crohr](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/crohr/32/29_2.png) [@crohr](https://community.convox.com/u/crohr)\
**Post date:** [February 25, 2019, 9:19am UTC](https://community.convox.com/t/relation-between-app-process-count-and-rack-instance-count/69/3 "2019-02-25T09:19:22Z")

</div>

I’m assuming you’re using gen2. In which case you can deploy as many instances of an app’s process as long as the underlying EC2 instances have the capacity. For a new deployment, you need to have at least one extra slot for your app’s process, available on the EC2 instances.

So to answer your question: yes you can have less EC2 instances than your app’s process count, although Convox requires at least 3 EC2 instances for a base rack.

---

<div class="post-metadata">

**Author:** ![ali](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/ali/32/15_2.png) [@ali](https://community.convox.com/u/ali)\
**Post date:** [February 25, 2019, 9:33am UTC](https://community.convox.com/t/relation-between-app-process-count-and-rack-instance-count/69/4 "2019-02-25T09:33:38Z")

</div>

Hi @crohr, thanks for your reply.

What about gen1? What makes gen2 _special_ in this regard please?

---

<div class="post-metadata">

**Author:** ![crohr](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/crohr/32/29_2.png) [@crohr](https://community.convox.com/u/crohr)\
**Post date:** [February 25, 2019, 11:42am UTC](https://community.convox.com/t/relation-between-app-process-count-and-rack-instance-count/69/5 "2019-02-25T11:42:13Z")

</div>

gen2 uses ALB with target groups, gen1 uses ELB with direct mapping between ELB and EC2 ports, so if I recall correctly you can only have one process per EC2 instance mapped to the same ELB port.

---

<div class="post-metadata">

**Author:** ![ali](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/ali/32/15_2.png) [@ali](https://community.convox.com/u/ali)\
**Post date:** [February 25, 2019, 12:06pm UTC](https://community.convox.com/t/relation-between-app-process-count-and-rack-instance-count/69/6 "2019-02-25T12:06:26Z")

</div>

Thank you @crohr. I appreciate you taking time to reply. 🙇‍♂️‍♂
