Bluemix Application Reduction Behavior

I have an orchestra service that tracks running instances and what request they are currently dealing with. If a new instance is required, I make a REST call to expand the instances and wait for the new instance to connect to the orchestra. This is one instance request.

Orchestrator keeps track of what the instance is doing and knows which instances can be stopped, however there is nothing in the API to reduce the number of instances that stop the particular instance, which I am trying to achieve.

Is there anything I can do to manipulate the platform deterministically stopping the instances I want to stop? Perhaps having long HTTP requests to the instances I need and killing the request when it is no longer needed and then calling an API call to reduce the number of instances?

Part of the problem here is that I don’t know the specifics of the current behavior ...

+5
source share
1 answer

Assuming you're talking about CloudFoundry / Instant Runtime applications, all application instances are behind a load balancer that uses circular distribution to distribute requests across all instances (unless you have a session cookie configured). Differentiation between instances of incoming requests or manual scaling is not recommended, and it is an anti-pattern. You cannot control in which instance the zoom task is selected.

If you really need this level of control with each instance, perhaps you should deploy them as separate applications. MyApp1, MyApp2, MyApp3 etc. All your applications can have the same route (myapp.mybluemix.net). Each of the applications can now distinguish itself by name (VCAP_APPLICATION), which allows you to terminate them.

+1
source

All Articles