Created
February 19, 2014 14:54
-
-
Save ndzj081221130/9093673 to your computer and use it in GitHub Desktop.
负载均衡
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > Written with [StackEdit](https://stackedit.io/). | |
| ---------- | |
| 查看路由表信息的 | |
| curl http://router:routerPass@routerIp:routerPort/routes | |
| 健康检查接口 | |
| curl http://router:routerPass@routerIp:routerPort/healthz | |
| 状态信息查看接口 | |
| curl http://router:routerPass@routerIp:routerPort/varz | |
| 讲一下cf是怎么支持应用多实例负载均衡的。 | |
| 由router实现。当用户请求来时,router首先判断有没有stick session,如果有,转发到上次处理该请求的DEA,否则,随机的选择一个的DEA,并转发该请求。 | |
| gorouter是部署多个的,前面加一层LVS(Linux Virtual Server)。 | |
| **简单地说,所有进入Cloud Foundry系统的请求都会经过Router组件。Router组件是可扩展的,由多个 Router共同处理进来的请求。但如何对Router做负载均衡不属于Cloud Foundry的实现范围。Cloud Foundry只须保证所有Router都可以处理任何请求,而管理员可用DNS实现负载均衡,也可部署专用硬件来实现,或者简单点,弄个Nginx做负载均衡。** | |
| 当一个用户部署的应用需要多个实例的时候,CC负责将stage部署请求转发到第一个可用的DEA上,droplet运行的时候,CC会选择一或多个DEA来运行droplet。 | |
| 也就是说,如果只有一个DEA,那么你跑一个应用的两个实例是办不到的? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment