title: Docker MAC Address Generation
body: <p>I had a question about applications running within Docker containers and UUID generation. </p>
  
  <p>Here’s our scenario:</p>
  
  <ul>
  <li><p>Currently our applications are using an event driven framework.</p></li>
  <li><p>For the events we generate the UUID’s based on mac address, pid,<br>
  time-stamp and counter.</p></li>
  <li><p>For running containers on a distributed system like CoreOS (while a very very very low chance), there is no guarantee that all those parameters used to generate a UUID would be unique for each container as one container on one server in the cluster could generate a UUID using the same mac, pid, time-stamp and counter as another container on the cluster.</p></li>
  <li><p>In essence if these two UUID’s were both to generate an event and send it to our messaging bus, then obviously there would be a conflict.</p></li>
  </ul>
  
  <p>In our analysis, this scenario seems to boil down to the uniqueness of mac addresses on each Docker container. </p>
  
  <p>So to be frank:</p>
  
  <ul>
  <li>How unique are the mac addresses within containers?</li>
  <li>How are mac addresses generated if they are not manually set?</li>
  </ul>