cubejs / cluster2

A node.js (>= 0.8.x) compatible multi-process management module
Other
48 stars 17 forks source link

generalize warmup port usage as 'routing' port #70

Open inexplicable opened 10 years ago

inexplicable commented 10 years ago

on 'cluster3' branch, we already used 'warmUpPort' to assign each worker a different port for the purpose of a guaranteed warmup, there're couple of more use cases which we think require this pattern to be generalized, after all, a dedicated port is for the sake of routing traffic to a specific worker (as it alone listens on that port)

some sample use cases are:

  1. testing a specific worker
  2. using server-sent event for logging, which requires a url that would route to a deterministic worker process