I am writing a proxy in java/spring where requests are accepted. Inside the proxy , the request is taken and a new request is made out of it. This request is sent to another server and results are obtained. And the result is sent back to the original person who requested it. So basically instead of X <-> Z The following is happening. X <-> Y <-> Z Here it is essential that Y should be able to filter out some results.
But then this approach is eating up a large amount of time
How can i optimize this ?