Hello I have this question I have not found an anwser yet.
I would like to create something like the image I attach.
The normal workflow should be something like this:
- Client sends a request to server 1;
- Server 1 receives the request;
- Server 1 sends a 302 (redirect) response to the client;
- Then client sends a new http request to server 2;
- Server 2 receives the request;
- Server 2 sends a 200 (ok) response to the client;
Instead of this I would like to realize something like:
- Client sends a request to server 1;
- Server 1 receives the request;
- Server 1 forward the request to server 2;
- Server 2 receives the request;
- Server 2 sends a direct response to the client;
So I do not want to send a redirect response from server 1 to client and then a new request from client to server 2!
It could be possible to realize something like this with node.js or, at least, with python?. I want this kind of architecture to speed up my service because server-server connection is far much faster then client-server connection.