I have deployed my application on cloud using Openshift. I tried few blogs but could not find out the best ways to implement the Load Balancing . Please help.
1 Answers
The simplest way is to find the icon that scales the application up and click it. In the current UI it's in Project --> Overview --> expand the application info (">" icon to the left), --> click "^" next to the blue circle to the right.
This gives you a default load-balancing across as many PODs (instances) of the application as your resources and imagination allow.
From the command line, this would scale it to 3 PODs:
oc scale --replicas=3 rc yourapplicationname
Another way is to deploy the same application with a different name, and then edit the route (Applications --> Routes --> RouteName) that points to it. There should be an option:
Alternate Services / Split traffic across multiple services
This gives you control over how much traffic you want through each version. Good for A/B testing or canary releases.
- 151
- 4