1

I have 2 web app using spring mvc in different location, here's some info:

1. server A:
    - have ip public

2. server B:
    - no ip public

3. Client:
    - want to access server B via server A using browser
    

Diagram:

Client  ---(request)--->  server A  ---(by pass the request)--->  server B

I want to client access server B through server A and i dont want to use VPN, what should i do?

and what we call this mechanism?

can i use netty for it?

JavaNewbie
  • 11
  • 1
  • There are many ways to do this, depends on the requirements. If there is only single API in server B, then you can write dumb controller in server A, and just call the server B API from it, and return the response received by the server B API. If there are many such APIs, then you must need some kind of gateway in front of your both the servers to route the requests. – Jignesh M. Khatri Sep 06 '22 at 05:07
  • A is called a “reverse proxy”. If there’s no need for business logic in service A, it’s common to use an HTTP server such as Apache httpd or nginx to perform this role. – Tim Moore Sep 06 '22 at 06:11
  • @JigneshM.Khatri yes, but at Server B there's no ip public, it's isolated, so i can't hit server B API – JavaNewbie Sep 07 '22 at 10:21
  • @TimMoore you right, its reverse proxy, i forgot about that. i think this is the answer – JavaNewbie Sep 07 '22 at 10:25

0 Answers0