Odin
  • Introduction
  • Why Odin?
  • Key Concepts
    • Environment
      • Environment Type
    • Provisioning
      • Provisioning Config for Component Types
    • Component
      • Available Component Types
      • Component Type reference
        • Optimus Components
          • Aerospike [6.3.0.7-1.0.0]
    • Service
      • Know Your Service Definition
    • Versioning
      • Clearing the Confusion: A Simplified Guide to Artifact, Component, and Service Versions
    • Service Sets
    • Labels
  • Reference
    • CLI reference
  • Onboard Your Service
    • Installation
    • Configure
    • Odin -h
    • Getting Started
    • Create Environment
      • Operations on Environment
    • Service Definition
    • Provisioning Config
    • Deploy Service
    • Release Service
    • Optimus Datastore Operations
      • How to use Optimus Datastore in my service?
      • RDS Operations
      • Aerospike Operations
      • Kafka Operations
    • Operating Service & Components
      • Redeploy
        • In Place Deployment
        • Blue Green Deployment
      • Rolling Restart
      • Adding & removing components
      • Revert a deployment for application component
      • Downscaling a Passive Stack
      • Updating the no. of stacks of application component
    • Dev <> QA iteration
    • Frequently Asked Questions
    • Deploy Concrete Service
    • Undeploy Service
    • Delete Environment
    • Appendix
  • How To
    • Define error threshold for canary deployment
    • Add or Remove a component in an already deployed service
    • Integrate mono-repo(cronjobs) with Odin
    • Deploy crontab with Odin
    • Integrate Data pipeline with Odin
    • Push logs to log central
    • Build artifacts for multi module applications
    • Load test with Odin
    • Track Deployments against Commit Ids
    • Deploy Service on Production - Dream11
    • How and when images are created
    • Check logs for deployed infrastructure - Dream11
    • Onboard Stepfunction as a component
    • Onboard Serverless as a component
    • Login to Kubernetes clusters
  • Release Notes
    • 1.2.0-beta.2 - 11 August, 2022
    • Odin October Release
    • Odin 1.2.0 - Nov 9th 2022
    • Odin February Release
Powered by GitBook
On this page
Export as PDF
  1. Onboard Your Service
  2. Operating Service & Components

Rolling Restart

PreviousBlue Green DeploymentNextAdding & removing components

Last updated 1 year ago

What is rolling restart?

A rolling restart is typically an operation that can be performed on an application component that is deployed across multiple instances or application servers (for example, in a cluster) to incrementally stop and start applications on each instance. The purpose may be for an application to pick up configuration changes that require a restart, while ensuring high availability of the application.

Example:

odin operate component --name my_application --service odindemo --env rol-res --operation rolling-restart --options '{"batch_size_percentage":5,"mode":"FORCEKILL"}'

The above command restarts the my_application component for service odindemo in environment rol-res while restarting 5% of the instances in one single batch till all the instances are restarted. The mode of restart is "FORCEKILL" in this example. Please refer to the below table for the options and their significance.

All Options for rolling-restart

Option
Type
Description
Example

batch_size_percentage

int

This field states the percentage of the batch at once you want to restart. The value of this field can be any integer ranging from 1 to 100. This value can vary based on your requirement. If you want to perform a full restart at once, the value of this field will be 100.

mode

string

This field states the way you want to perform the restart. There are two options:

  1. FORCEKILL: Forceful mode restarts your application without taking in-flight request in account. It is a faster way of performing the restart and mostly recommended if you have an application that is not functioning in a desired manner. This mode of restart will kill the in-flight requests, hence returning an error for such users. This method restarts your application and performs a health check before registering the same.

  2. GRACEFUL: Graceful mode provides you a window of 15-sec to complete your in-flight requests. It is a longer but graceful way of performing the restart and mostly recommended in case you want to update some config without impacting the user experience. This method restarts your application followed by a health check before registering after the same.

Start.sh should be in such a way that stopping the application and re-running the start.sh will restart the application successfully.The process of Rolling restart will stop the application and execute start.sh for your application to restart your application. Hence, to make rolling restart a success, you must have start.sh operational and error free.

Refer to Example
Refer to Example