2

Openresty has an option for specifying the path to the LuaJIT. The NGXIN/Lua module uses co-routines for each request. However, Tarantool uses Fibers instead of Co-routines.

Does this mean you would have to create a custom lua-nginx-module that uses the Tarantool's Fibers?

Or are there other reasons why Tarantool shouldn't be embedded inside of Openresty/NGINX for tiny apps (i.e. without a multi-machine setup)?

Community
  • 1
  • 1
dgo.a
  • 2,634
  • 23
  • 35
  • one asks - second answers, good strategy! – Alexander Altshuler Mar 25 '16 at 18:49
  • @AlexanderAltshuler I think you meant: "One question, two answers. Good strategy!" That sounds sarcastic. Did I do something wrong or impolite? – dgo.a Mar 25 '16 at 21:37
  • @AlexanderAltshuler And? I liked it because I'm the author of Tarantool nginx upstream module(and Tarantool contributor), this is not a strategy, I like when ppl use nginx this way, for instance read my article https://medium.com/@vasiliysoshnikov/building-nginx-and-tarantool-based-services-c92492fc34c6#.smh7uf2iv – Vasiliy Soshnikov Mar 28 '16 at 21:31
  • P.S. @AlexanderAltshuler also I find this is good idea try to integrate Tarantool to nginx + Openresty. So this is definitely good question and idea for my next investigation. – Vasiliy Soshnikov Mar 28 '16 at 21:38

1 Answers1

0

There are few options to use Tarantool with nginx.

The first one is to use Tarantool nginx module: https://github.com/tarantool/nginx_upstream_module

The second one is to use resty lib: https://github.com/perusio/lua-resty-tarantool

Currently there are no ways to use Tarantool directly inside nginx.

  • P.S. nginx upstream module can be used with openresty lua upstreams – Vasiliy Soshnikov Mar 23 '16 at 19:37
  • Is the https://github.com/perusio/lua-resty-tarantool library still working? I get attempt to send data on a closed socket: u:0000000040F750E8, c:0000000000000000, ft:8 eof:0, client: 172.18.0.1 everytime I try to ping(/select,insert) tarantool even if tar:connect returns true. If it still works is there somewhere where I can see an example? Of lua-resty-tarantool inside openresty? – TaoJS May 14 '17 at 16:43
  • 1
    Hi! Here is the new version on OpenResty library: https://github.com/tarantool/tarantool-lua – Vasiliy Soshnikov May 15 '17 at 21:51