-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add TSGI Layer Between Router and Server #81
Add TSGI Layer Between Router and Server #81
Conversation
1. Distinct subfolders nginx_server/ server/ for NGINX and builtin servers. 2. Extract common (not specific to particular tsgi adapter) code to http/tsgi.lua.
As it is used in both builtin- and nginx- servers, its extracted to common http/tsgi module.
README.md
Outdated
@@ -208,11 +208,13 @@ end | |||
* `req.headers` - normalized request headers. A normalized header | |||
is in the lower case, all headers joined together into a single string. | |||
* `req.peer` - a Lua table with information about the remote peer | |||
(like `socket:peer()`). | |||
(like `socket:peer()`). **NOTE**: not available when using NGINX TSGI | |||
adapter. |
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.
Хотелось бы оставить socket:peer() частично рабочим.
Пользователь может смотреть адрес клиента - логировать, анализировать, етц.
Michael Filonenko, [13 May 2019 at 11:20:51]:
логирование, и вдруг поднимут два нжинкса, захотят посмотреть кто говнит
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.
Please add doc file with TSGI spec |
host and port are extracted via box.session.peer(). family, type and protocol are hardcoded.
Changes done: 1. decompose the code into modular pieces 2. decouple router and server parts 3. introduce nginx as possible Web Server via TSGI adapter 4. enable router tests on NGINX Note: this change breaks connection stealing.
Changes done: 1. decompose the code into modular pieces 2. decouple router and server parts 3. introduce nginx as possible Web Server via TSGI adapter 4. enable router tests on NGINX Note: this change breaks connection stealing.
Overview
Read TSGI Spec Draft for details on TSGI layer.
I consider this PR as an alpha version of tarantool/http 2.0: new features, more breaking changes may be introduced.
Changes
test_locally.sh
.TODO