How to make a remote server be invisible to a user

I have a webserver that takes user input and calculates results on a remote server: <form action="">

Now the user is on the second server. How do I keep the user on the main server (or make www2 invisible to the user)?

One possibility is to do an Ajax query in the background, but that would mean results are transferred from www2 to www and then to the user, which adds delay and bandwidth costs.

What are some possibilities to accomplish this?

Also, if, in future, we have multiple remote servers www2, www3, etc. what would be the best way to accomplish this?