-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow worker listen different port to support nginx sticky #94
base: master
Are you sure you want to change the base?
Conversation
e814ca4
to
d7f86a5
Compare
Codecov Report
@@ Coverage Diff @@
## master #94 +/- ##
==========================================
- Coverage 98.81% 98.46% -0.36%
==========================================
Files 8 8
Lines 507 520 +13
==========================================
+ Hits 501 512 +11
- Misses 6 8 +2
Continue to review full report at Codecov.
|
e517270
to
7127c43
Compare
this[WORKER_ADDRESSES].push(address); | ||
} else { | ||
address.port = this.options.sticky ? this[REAL_PORT] : address.port; | ||
this[APP_ADDRESS] = getAddress(address); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete isUnixSock
checking?
to: 'master', | ||
from: 'app', | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send port to master after egg ready and before server listen.
port, | ||
protocol, | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete this one?
const stickyMsg = this.options.sticky ? ' with STICKY MODE!' : ''; | ||
this.logger.info('[master] %s started on %s (%sms)%s', | ||
frameworkPkg.name, this[APP_ADDRESS], Date.now() - startTime, stickyMsg); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the different between nginxSticky
and sticky
? Seems they are mixed together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nginxSticky
: nginx -> app-workersticky
: nginx -> master -> app-worker
@ngot Use |
Checklist
npm test
passesAffected core subsystem(s)
Description of change