         assert _.isArray(queue), "got invalid proxy queue"
         response.writeHead 504, reason if _.isEmpty queue
         return response.end(msg) and no if _.isEmpty queue
-        assert proxy = queue.shift(); queue.push proxy
+        assert proxy = select.apply this, arguments
         a = "#{proxy.target.host}:#{proxy.target.port}"
         assert a = "#{a.toLowerCase().underline.yellow}"
         logger.debug "Proxy %s request %s to %s", x, u, a

            res.writeHead 500, "a proxy backend error"
            res.end format msg, err.toString(); this

    # This is a factory method that produces request forwarders.
    # These are directly responsible for proxying an HTTP request
    # from the master server (frontend) to actual server (backend)
    # that does the job of handling the request. The forwarder is
    # also responsible for rotating (round-robin) servers queue!
    makeForwarder: (queue, kind) -> (request, response) =>
        encrypted = request.connection.encrypted
        assert u = "#{request.url}".underline.yellow
        assert x = (encrypted and "HTTPS" or "HTTP").bold

    # refer to the `node-http-proxy` library for info on the proxy.
    # Also see `makeForward` method for details on load balancing!
    startupHttpMaster: ->
        assert _.isArray q = @queueOfHttp ?= Array()
        assert _.isString host = nconf.get "master:host"
        assert _.isNumber port = nconf.get "master:http"
        cmp = (exm) -> (srv) -> exm.uuid is srv.uuid or 0
        remove = (srv) => _.remove @queueOfHttp, cmp(srv)
        assert registr = @makeRegistrar q, "http", null
        assert selectr = @makeSelectors q, "http", null
        assert forward = @makeForwarder q, "http", selectr
        assert upgrade = @makeUpgraders q, "http", selectr
        assert @serverProxy = http.createServer forward
        assert @serverProxy; @serverProxy.listen port, host
        @serverProxy.on "upgrade", -> upgrade arguments...
