Cloud Foundry / Bluemix load balancing

*爱你&永不变心* 提交于 2019-12-30 11:14:09

问题


I know that by default, Bluemix / Cloud Foundry use round-robin load balancing. Is there a way to change that? If I deploy 2 apps with the same route, and want 90% of my traffic to go to blue, and 10% to green, is that possible?


回答1:


You would have to deploy more than two instances of the app to have better than 50-50 control over who sees what. If you have 10 instances, for example, and you update 1, then you could get your 90-10 split.

Check out this CF CLI plugin: https://github.com/krujos/scaleover-plugin




回答2:


Configuring the load balancer is not possible.




回答3:


One workaround you could use to "simulate" a load balancer would be to set up an application which fronts all of the requests. Bind the route to this application and then include some logic inside it which just redirects traffic to the other services in a 9:1 ratio.

The risks of using this approach are:

  • Your load-balancer application could theoretically go down
  • Your load-balancer application doesn't know the status of the other two services so might route traffic to an offline service instance

You can minimize the first risk by using multiple instances on the "load balancer" app.




回答4:


You want to implement Blue-Green Deployment.

If you have deployed your Cloudfoundry PaaS on AWS, you might take help of AWS Route53 to manage it.

You can specify your routes of the apps in route53 and send weighted traffic.

Then You can specify how much traffic you want to send to one route and how much to the other.

Hope it Helps.. :)



来源:https://stackoverflow.com/questions/32810816/cloud-foundry-bluemix-load-balancing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!