title: what are the pros and cons of creating kafka broker and zookeeper in two docker conatiners in same machine
body: <p>I am creating a kafka data pipeline with 3 kafka brokers and 3 zookeepers so I need to use 6 machines to deploy 3 brokers and 3 zookepers.
  There are two ways to reduce no/of machines used </p>
  
  <p>1) To keep 1 kafka broker and 1 zookeeper in the same physical machine
     I searched in web and found in quora that there will be latency issues as both kafka broker and zookeeper are using the same RAM</p>
  
  <p>2) using docker and creating two continers in a machine each for zookeeper and broker and limiting the RAM of the zookeeper container so that more RAM is taken by the kafka broker and to reduce the latency</p>
  
  <p>I want to know more pros and cons of my two use cases</p>
  
  <p>Is it a good practice to keep both zookeeper and broker in same machine using containers </p>
  
  <p>Thanks in advance</p>