Agent, in the literal sense, is the equivalent of a middleman.
Bring to the project as well, then come such a metaphor.
User (client) proxy (positive, reverse) provider (server side).
Forward agent.
The whole process like going to a restaurant to eat, we are also the user (client) to the restaurant to eat (send a request), you know you want to eat is shredded pork (request), but you can not do it, then you need to let the Chef (service end) to you to do, but went to the restaurant, the chef is in the background, you can not directly to tell the chef, Because you do not have the authority (the service is in the background) this time the attendant (agent) to help tell said that a certain customer (client) to a plate of shredded pork (Request/Visit the Chef (service end) receives to do well then to the waiter (agent) the waiter to get the fish fragrant shredded pork (resource/response) sends back to the customer (client side).
OK, the simple process is over. So we understand the role of the agency it.
Reverse proxy.
Continue to metaphor, said we (client) today to eat a hairy crab in your restaurant (request), the waiter (agent) received this request found that the chef can not do this hairy crabs, but also need to earn money, this how to do? The waiter thinks, the hotel next door can do, and I also and that chef (another service side) have intersection, then I go to let another chef to do how. Good. So the waiter went to tell another chef that you help me make a hairy crab (request), the next door chef said yes, OK. Just give it to the waiter. So this time, the attendant (reverse proxy) becomes the reverse proxy, because he is going to invoke another server. At this time we (clients) generally do not need to know how the hairy crabs come from, as long as there is good.
Attention:
So who can be the waiter? Certainly not, so this waiter (agent) needs to be in the hotel post (configuration) before you can. That is, the agent needs to be configured.
So does the reverse proxy need to be. The answer is not needed, you will understand the thinking.
Then the advantage of the reverse proxy is reflected, I do not need to configure, and I can not only in one call request, I could send a request to multiple service side. The reverse proxy can also load-balance multiple back-end servers.