<p>I am using kubernetes to deploy a simple application. The pieces are:</p>

<ul>
<li>a rabbitMQ instance</li>
<li>a stateless HTTP server</li>
<li>a worker that takes jobs from the message queue and processes them</li>
</ul>

<p>I want to be able to scale the HTTP server and the worker up and down independently of each other. Would it be more appropriate for me to create a single deployment containing one pod for the HTTP server and one for the worker, or separate deployments for the HTTP server / worker?</p>

<p>You should definitely choose different deployment for HTTP Server and the worker. For following reasons:</p>

<ul>
<li><p>Your scaling characteristics are different for both of them. It does not make sense to put them in the same deployment</p></li>
<li><p>The parameters on which you will scale will be different too. For HTTP server it might be RPS and for worker application, it will number of items pending/to be processed state. You can create HPA and scale them for different parameters that suit them best</p></li>
<li><p>The metrics &amp; logs that you want to collect and measure for each would be again different and would make sense to keep them separate.</p></li>
</ul>

<p>I think the Single Responsibility principle fits well too and would unnecessarily mix things up if you keep then in same pod/deployment.</p>
