【发布时间】:2013-12-03 19:39:10
【问题描述】:
目前,我们有许多组件在 REST 和 SOAP 上公开其 API,并且还存在许多 Web 应用程序。下面是使用示例域模拟某些端点的一些端点的高级视图将是 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 |
为了解决各种使用场景,我们引入了 ESB,现在所有这些 API 甚至 Web 应用程序都通过 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 |
所有这些公共 api 都指向 ESB,但现在 ESB 已经在不同的端口和端点中公开了这些 API 和 Web 应用程序。例如:现在 v2 应用程序使用路径 /service/v2 侦听端口 8280
由于端点发生了变化,为了支持具有默认端口的现有端点,ELB 必须满足这些要求。但这似乎与 ELB 紧密耦合,因为需要在端口和路径之间进行一些转换。
我有几个问题
- 这是通过 ESB 公开 api 的正确方法吗?
- 在 ELB 级别处理端口和路径是正常且正确的行为吗?
- AWS ELB 是否能够支持此要求?
- 如果问题一的答案是“否”,是否有中介级别的逻辑可以根据子域 URL 模式等路由到不同的服务器?
【问题讨论】:
-
听起来您需要适当的 SOA 治理?你有官方的治理文件吗?您的 SOA 政策应该回答这些问题。
-
@Namphibian,感谢您的评论。最初,我们没有实施 SOA 治理,后来我们启动了 SOA 治理,包括 SOA 策略地址设计规则的数量