亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Load Balancing - NGINX forwards TCP to the backend server. How does the backend server obtain the user's real IP address? The NGINX server and the backend server are not in the same network segment
高洛峰
高洛峰 2017-06-16 09:19:41
0
1
1982

Recently there is a requirement to forward TCP requests to the real back-end server through a transit server, but the problem encountered now is that the back-end server cannot obtain the user's real IP.

Please note that it is a TCP connection, not HTTP. It is a function in the stream module of NGINX. I checked a lot of information online. The official NGINX document says it can be solved, but does not give detailed operation guidance. , I hope friends who have already implemented it can help answer the question. Also, if LVS is used as a load, can the back-end server obtain the real IP of the client if the machine is not in the same network segment? If possible, please link to relevant articles.

Reference documentation:
https://nginx.org/en/docs/str...
https://www.nginx.com/blog/tc...

高洛峰
高洛峰

擁有18年軟件開發(fā)和IT教學(xué)經(jīng)驗(yàn)。曾任多家上市公司技術(shù)總監(jiān)、架構(gòu)師、項(xiàng)目經(jīng)理、高級軟件工程師等職務(wù)。 網(wǎng)絡(luò)人氣名人講師,...

reply all(1)
黃舟

LVS cannot obtain the real IP by default in nat or fullnat mode.

Alibaba’s fullnat can pass the real IP to the backend through TCP Option.

nginx’s stream module can pass the real IP through proxy protocol https://www.haproxy.org/downl...

Both have one thing in common:

The backend needs to modify the code to obtain this IP.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template