Question

Currently we are having number of components exposing their APIs on REST and SOAP and number of web applications also existing. Below is a high-level view of some of the endpoints emulating some endpoints using sample domain will be example.com

restsvc.example.com/v2 --ELB---> | svr1.example.com/v2 |

soapsvc.example.com/v3 --ELB---> | svr2.example.com/v3 |

corpwebapp.example.com --ELB---> | svr1.example.com/someapp/index.html |

ncorpwebapp.example.com --ELB---> | svr2.example.com/anotherapp/index.html |

To address various number of usage scenarios we have introduced an ESB and now all of these APIs and even Web applications are proxy-ed via ESB.

restsvc.example.com/v2 -ELB--> |esb.example.com:8280/service/v2 | --> |svr1.example.com/v2 |

soapsvc.example.com/v2 -ELB-->|esb.example.com:8280/service/v3| -->| svr2.example.com/v3 |

corpwebapp.example.com -ELB-->|esb.example.com:8380/someapp/index.html | -->| svr1.example.com/someapp/index.html |

nonwebapp.example.com -ELB-->|esb.example.com:8480/someapp/index.html | --> | svr2.example.com/anotherapp/index.html |

All of these public apis are pointing to the ESB, but now ESB has exposed these APIs and web apps in different ports and end points. Eg: Now v2 app listen on port 8280 with path /service/v2

Since end points are changed, in order to support the existing end points with default port, ELB has to cater these requirements. But this seems tight coupling with ELB since some transformation between ports and paths needs to be done.

I have several questions

  1. Is this is a correct way of exposing apis via ESBs ?
  2. Is handling port and paths at ELB level is normal and correct behavior ?
  3. Is AWS ELB is capable to support this requirement ?
  4. If question one answers "no", is it good to have mediation level logic to route to different servers based on subdomains URL patterns etc.?
Was it helpful?

Solution

After analyzing some of the information and with the expert feedbacks we introduce these policies and implemented in our infrastructure.

Ideally the ESB should listen on a common ports (80 or 443). It should then look at the request details and route the request to various apps. It can do the routing based on content-type, request url etc.

ELBs will forward requests to one or ESBs, when number of variations are need to be mapped between ELBs and ESB. configuration changes should be minimalistic. The implementation introduced in the question has some core mapping logic bound at the ELB side. The internal routing logic with in the ESB can be changed to accommodate such requirements.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top