Software Development Deployment Strategy

2024-08-09 hit count image

Let's see the types and usage of service deployment strategies in software development.

Outline

In software development, deployment strategies are a way to keep services running reliably. There are many different types of deployment strategies, and you should select and use the appropriate deployment strategy based on each feature. In this blog post, I will introduce the types and usage of deployment strategies.

In-place deployment

In-place deployment is a structure that notifies users, like financial institutions or game updates, and stops and updates services at that time.

Deployment strategy - in place deployment
  1. Stop the running server.
  2. Deploy a new application.
  3. Restart the stopped server.

In-place deployment has the following advantages and disadvantages.

Advantages

  • All users always use the same version of the application.
  • There is no need to consider compatibility because old and new versions do not exist at the same time, and there is no possibility of problems due to lack of compatibility.
  • There is no need for infrastructure configuration for deployment, and deployment is simple, so it is cost-effective.

Disadvantages

  • The service must be stopped.
  • After deployment, if there is a problem and you need to roll back, it is difficult to roll back because you need to stop the service.
  • If a problem occurs during deployment, the service downtime may be long.

In-place deployment is used for services that become important issues (financial issues) if problems occur between old and new versions, or services like games that cannot use new items, maps, and game systems without using the new version.

Rolling-update deployment

Rolling-update deployment is a method used when you have a limited number of servers that can operate, and when you need to deploy uninterrupted, unlike in-place deployments.

Deployment strategy - rolling update deployment
  1. Make one of the currently running servers inaccessible from the outside (users).
  2. Check for no access.
  3. Deploy a new application to the server where access is stopped.
  4. Make the deployed server accessible from the outside.
  5. Check if the new server can be accessed from the outside.
  6. Repeat 1-5 until all servers become a new version of the application.

Rolling-update deployment has the following advantages and disadvantages.

Advantages

  • You can deploy without interruption.
  • You can use multiple servers to deploy, so you can stop deploying or roll back if there is a problem.
  • Deploying to multiple servers maximizes the use of new versions of the application, so the load is distributed.

Disadvantages

  • Because the number of servers is limited, stopping one server for deployment may cause temporary load problems on other servers.
  • Deploying occurs one by one, so it takes time to deploy to all servers.
  • Because old and new versions are running at the same time, you need to develop and deploy compatible applications.

This deployment method is used when there are restrictions on operating funds and you cannot increase the number of servers, and when you want to operate services without interruption.

Blue-green deployment

Blue/Green Deployment is a common method if you have no server limitations and want to deploy services uninterrupted. You can also use this method if you want to test a new version of the application in a production environment.

Deployment strategy - Blue green deployment
  1. Create a server (Green) to deploy a new version.
  2. Deploy a new application to the new server.
  3. Direct new access to the new server and prevent new access to the existing server (Blue).
  4. When accessing a new server or when a problem occurs in a new application, direct new access to the existing server to roll back.
  5. If there is no problem with the new server’s access, delete the existing server.

Blue-green deployment has the following advantages and disadvantages.

Advantages

  • You can deploy without interruption.
  • When deploying a new version, the previous version of the server is still alive, so if there is a problem, you can roll back quickly.

Disadvantages

  • You need to prepare servers for new and old versions, so the temporary cost is doubled.
  • Check the new version for problems and delete the old version, so it takes time to complete the deployment.
  • After deploying and deleting the old version server, you cannot roll back. In this case, you need to redeploy the previous version to roll back.

Blue/Green deployment is used by services that have no problem if new and old versions exist at the same time, and it is used by services that manage user access using Session or Socket because existing access is not forcibly disconnected during deployment.

Canary deployment

Canary deployment is a deployment method that can be used when you need feedback on A/B testing, new version features, want to carefully update services, or want to test features under development in a production environment.

Deployment strategy - Canary deployment
  1. Prepare a server to deploy a new version.
  2. Gradually increase the access to the new version.
  3. If you determine that the new version is good, gradually increase the user’s access.
  4. If it is determined that the new version is not good, return the user’s access to the previous version.
  5. When all access directs to the new version of the server, delete the previous version of the server.

Canary deployment has the following advantages and disadvantages.

Advantages

  • You can observe the reaction of A/B testing or new features and decide whether to introduce new features.
  • Rollback is easy.
  • You can deploy while monitoring, so you can deploy more safely.

Disadvantages

  • You need to prepare servers for the new version and the previous version, so the temporary cost is doubled.
  • Check the new version for problems and delete the old version, so it takes time to complete the deployment.
  • Depending on the person using the service, the screen may be different or new features may not be available, causing a UX mismatch problem.

If you want to observe the reaction of A/B testing or new features, want to carefully update services, or want to test features under development in a production environment, you can use this deployment method.

Completed

Done! we’ve seen the types and usage of service deployment strategies in software development. I hope this blog post helps you choose the appropriate deployment strategy for the services and resources you are currently operating.

Was my blog helpful? Please leave a comment at the bottom. it will be a great help to me!

App promotion

You can use the applications that are created by this blog writer Deku.
Deku created the applications with Flutter.

If you have interested, please try to download them for free.

Posts