Skip to content

Conversation

@ASverdlov
Copy link
Contributor

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

  • Add NGINX TSGI Adapter. Allows to use existing router (with some minor restrictions) with nginx-upstream-module.
  • Decouple Server from Router
  • Tests on nginx-/builtin- adapter. See test_locally.sh.

TODO

  1. Enhance documentation.

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
* `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.
Copy link
Contributor

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]:
логирование, и вдруг поднимут два нжинкса, захотят посмотреть кто говнит

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@filonenko-mikhail
Copy link
Contributor

Please add doc file with TSGI spec

host and port are extracted via
box.session.peer().

family, type and protocol are hardcoded.
@ASverdlov ASverdlov merged commit 1cc26ed into tarantool:v2alpha May 18, 2019
knazarov pushed a commit that referenced this pull request Oct 4, 2019
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.
@ligurio ligurio mentioned this pull request Oct 22, 2021
ligurio pushed a commit that referenced this pull request Oct 27, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants