title: How can two Unicorn servers bind to the same Unix socket?
body: <p>This (rather old) <a href="https://github.com/blog/517-unicorn" rel="nofollow noreferrer">article</a> seems to suggest that two Unicorn master processes
  can bind to the same Unix socket path:</p>
  
  <blockquote>
    <p>When the old master receives the QUIT, it starts gracefully shutting down its workers. Once
    all the workers have finished serving requests, it dies. We now have a fresh version of our
    app, fully loaded and ready to receive requests, without any downtime: the old and new workers
    all share the Unix Domain Socket so nginx doesn’t have to even care about the transition.</p>
  </blockquote>
  
  <p>Reading around, I don't understand how this is possible. From what I understand, to truly have zero
  downtime you have to use <code>SO_REUSEPORT</code> to let the old and new servers temporarily be bound to the
  same socket. But <code>SO_REUSEPORT</code> is <a href="https://stackoverflow.com/a/23935961">not supported on Unix sockets</a>.
  (I tested this by binding to a Unix socket path that is already in use by another server, and I got
  an <code>EADDRINUSE</code>.)</p>
  
  <p>So how can the configuration that the article describes be achieved?</p>
  
  <ul>
  <li>Nginx forwards HTTP requests to a Unix socket.</li>
  <li>Normally a single Unicorn server accepts requests on this socket and handles them (fair enough).</li>
  <li>During redeployment, a new Unicorn server begins to accept requests on this socket and handles them, while the old server is still running (how?)</li>
  </ul>