How would you perform a rolling update of an application across multiple servers to ensure zero downtime?


Use the serial keyword to update servers in batches.

- hosts: app_servers
  serial: 2  # Update 2 servers at a time
  tasks:
    - name: Deploy the new application
      copy:
        src: /path/to/app
        dest: /var/www/app
      notify: restart app service
        

  • Ensure that a load balancer routes traffic away from the servers being updated. You can automate this by interacting with APIs (e.g., AWS ALB or NGINX).
  • Use health checks to confirm that each server is healthy before proceeding to the next batch.

Srinivas Reddy Ettedi

DevOps Engineer | Expertise in Maven, Git, Terraform, Kubernetes, Ansible, Prometheus, Python, Azure, AWS, GCP, SonarQube, Grafana & ELK Stack

2 个月

Love this

回复

要查看或添加评论,请登录

Manasee Suuba的更多文章

  • How Pods Differ from Containers

    How Pods Differ from Containers

    Containers are the basic building blocks for running individual applications, pods provide the orchestration-friendly…

  • AWS IAM (Identity and Access Management)

    AWS IAM (Identity and Access Management)

    AWS IAM is a service that enables you to manage access to AWS resources securely. It controls who (users, roles, or…

  • AWS Instance

    AWS Instance

    In AWS (Amazon Web Services), an instance refers to a virtual server that runs applications on the AWS infrastructure…

  • VPC

    VPC

    A VPC (Virtual Private Cloud) in AWS is a logically isolated section of the AWS cloud where you can launch AWS…

  • IAM

    IAM

    AWS IAM (Identity and Access Management) is a web service that helps you securely control access to AWS services and…

  • S3 bucket

    S3 bucket

    Amazon S3 (Simple Storage Service) is a scalable and durable object storage service provided by AWS. S3 Buckets are…

  • Cloudfront

    Cloudfront

    Amazon CloudFront is a content delivery network (CDN) service provided by AWS. It helps deliver content (web pages…

  • Cloudwatch

    Cloudwatch

    Amazon CloudWatch is a monitoring and observability service provided by AWS that helps you track the performance and…

  • CIDR Block

    CIDR Block

    A CIDR block (Classless Inter-Domain Routing block) is a range of IP addresses that is defined by a base IP address and…

  • Creating a project that integrates Terraform and Ansible can be a great way to automate both the provisioning and configuration of infrastructure.

    Creating a project that integrates Terraform and Ansible can be a great way to automate both the provisioning and configuration of infrastructure.

    Project Overview Terraform: Used to provision an EC2 instance in AWS. Ansible: Used to configure the EC2 instance by…