The newest Tarantool version has a new function setting takes_raw_args. Instance can create such function in _func and it will take arguments as a raw MessagePack buffer. The function then can decode some first arguments and leave the others not decoded. For instance, to forward them further to another instance.
Also netbox now supports return_raw option - works the same. Result of the remote call is a raw MessagePack buffer. Not decoded into Lua values.
These options together should help to reduce pressure on the router when it is used as a proxy. Router would need to offer a function like vshard.router.callraw(). It would take a MessagePack buffer with the same arguments encoded as vshard.router.call() and return result also as a MessagePack buffer (using return_raw netbox option when talks to the storage).
In order to use it the user would need to register it in _func with takes_raw_args and call it from clients. Router can't do that itself, because it is not supposed to depend on any local spaces.
The newest Tarantool version has a new function setting
takes_raw_args
. Instance can create such function in_func
and it will take arguments as a raw MessagePack buffer. The function then can decode some first arguments and leave the others not decoded. For instance, to forward them further to another instance.Also netbox now supports
return_raw
option - works the same. Result of the remote call is a raw MessagePack buffer. Not decoded into Lua values.These options together should help to reduce pressure on the router when it is used as a proxy. Router would need to offer a function like
vshard.router.callraw()
. It would take a MessagePack buffer with the same arguments encoded asvshard.router.call()
and return result also as a MessagePack buffer (usingreturn_raw
netbox option when talks to the storage).In order to use it the user would need to register it in
_func
withtakes_raw_args
and call it from clients. Router can't do that itself, because it is not supposed to depend on any local spaces.