stage in request info
kaven276 edited this page Jan 21, 2016
·
4 revisions
- request line
- request method: u$method nginx:$request_method node:req.method
- pathname: u$pathname nginx:$document_uri node:req.url.pathname
- query string: u$qstr nginx:$query_string node:req.url.query
- headers
- end-to-end headers
- hop-to-hop headers
- cookies
- access path info
- client ip: a$caddr nginx:$remote_addr
- client port: a$cport nginx:$remote_port
- server ip/port/name
- dispatcher_cfg oslot cslot
Before send to noradle-dispatcher real request info, any protocol should sent dispatcher a pre-head info, include session key, so dispatcher can get session info by the session key, and append session name-value pairs to oracle.
Move session fetch/set from noradle-http to noradle-dispatcher, then noradle-dispatcher can use internal in-process session cache, or just Redis.
Or use signed cookie, not use session cookie, all name-value pairs in session are signed with a secret, all cookie value that have a secret will checked.
- hash(BSID+Secret) -> crypto key
- encrypt(userid, crypto-key) -> encrypted userid for cookie value
no one can known the user id in the middle, no server-side session is required.
If browser session id is provided, noradle can save the last access time in dispatcher, and send it to oracle.