title: Golang HTTP request worker pool
body: <p>I'm trying to build a system, worker pool / jobqueue, to handle as many <code>http requests</code> as possible on each API endpoint. I looked into this <a href="http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang/" rel="nofollow noreferrer">example</a> and got it working just fine except that I stumbled upon the problem that I don't understand how to expand the <code>pool / jobqueue</code> to different endpoints.</p>
  
  <p>For scenario sake let's sketch an Golang http server that has a million request / min across different endpoints and request types <code>GET</code> &amp; <code>POST</code> ETC.</p>
  
  <p>How can I expand on this concept? Should I create different worker pools and jobs for each endpoint. Or can I create different jobs and enter them in the same queue and have the same pool handle these? </p>
  
  <p>I want to maintain simplicity where if I create a new API endpoint I don't have to create new worker pools, so I can focus just on the api. But performance is also very much in mind.</p>
  
  <p>The code I'm trying to build on is taken from the example linked earlier, <a href="https://github.com/beyazc/job-worker" rel="nofollow noreferrer">here</a> is a github 'gist' of somebody else with this code.</p>