Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Tunneling request through a different socket connection?

$
0
0
Hi, I am not sure if this is possible somehow (either by using out-of-the box Nginx or by writing some Nginx module).
I did not managed do find yet a problem description similar to mine on the net or in the Nginx Module Extension book.
(But this does not mean the info might not be available somewhere.. )

Anyways, here is my scenario. (The scenario might sound strange, but C1 below is part of a private API and C2 is part of a public API. C1 and C2 are bridged through Nginx.)
C1 is a client socket connecting over a TCP/IP connection to Nginx. Over C1 are mostly async messages sent over the same "persistent" socket connection. These async messages are received by Nginx, transformed and then dropped in a DB.

C2 is a client socket connecting over HTTP to Nginx. Over C2, REST request are intended to be sent/tunneled (via Nginx) to C1. C1, after receiving & processing the REST request, would reply (via Nginx) to C2.
So the question would be: can Nginx be configured / programmed in such a way, that certain (or all) HTTP requests to be tunneled through specific & existing Nginx socket connections (such as C1)?
I would appreciate any help and/or pointers to further documentation which I did not found so far.

Kind regards,
M.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>