Managing Deployments


Deployments of regular applications can become complex. By integrating microservice architecture, race-conditions can take place on top of the normal risks of deployments. Therefore this sections coveres some important topics when evaluating the go-live decision:

  • Downtimes shall be avoided or minimized
  • Service deployments must be idependend from each other
  • Efforts for coordination must be minimized

To achieve these aims, there are two major deployment strategies, which will be evaluated with a few details.

Blue/Green Deployment

Blue/Green deployments, which are also called big flip or red/black deployment, consists of two phases:

  1. Deploy version B on as many servers as version A is running
  2. Switch from version A to version B
    this can be realized by using a Service Registry
  3. Supervise version B
  4. Dismantle all servers of version A servers OR roll-back

For this approach infrastructure and license costs and the expected time-frame must be considered, as it may impair business timelines or aims.

Rollin Upgrade

This deployment strategy tries to utilize the given resources more effectively. The reduced costs correlated with reduced performance during the go-live:

  1. Deploy version B on n-many servers, where version A was running
  2. Switch from Version A to version B
    this can be realized by using a Service Registry as elastic load balancer (ELB)
  3. Supervise version B
  4. Contrinue the roll-out OR roll-back

Consistency

When working with multiple versions of a service, it might happen, that a client is connected to one version of the service while another replaced it or is expected. This scenario must be considered during deployments, as unwanted results may be the outcome. Other services also need to consider this case, e.g. with graceful degradation implementations for their services, e.g. by looking up the the new service version at the Service Registry or requesting a certain version of a service via configuration parameters. Adding version information for the Service Registry also support back and forward compatibility for all services offered. For avoiding this issue Feature Toggles can also be leveraged by switching all version within a Blue/Green Deployment.