DEV Community

Cover image for Deployment Strategies: Push-and-Pray
Amburi Roy
Amburi Roy

Posted on • Updated on

Deployment Strategies: Push-and-Pray

A push-and-pray deployment is a deployment strategy where developers simply push the new code to production and hope that it works. There is no possibility to test new code in production to ensure that the new code is stable and secure for production. This is a risky deployment strategy because it can lead to downtime, errors, and security vulnerabilities.

Useful for

  • Small businesses or organizations (start-ups) with fewer resources to invest
  • Large organizations can sometimes use push-and-pray deployments, especially in emergency situations — serious production errors

Advantages

  • Simple and easy to implement.
  • Does not require any special tools or infrastructure.
  • Can be used to deploy changes to any type of application.

Disadvantages

  • Downtime: If the new code is not stable, it can cause downtime for users.
  • Errors: The new code may contain errors that can cause problems for users.
  • Security vulnerabilities: The new code may contain security vulnerabilities that can be exploited by attackers.
  • Lack of visibility: There is no way to track the performance of the new code after it has been deployed.

Before considering using a push-and-pray deployment strategy, carefully weigh the risks and benefits. In most cases, it is better to use a more sophisticated deployment strategy that includes testing and monitoring.

Reliable and Secure Alternatives

  • Canary deployment: A canary deployment is a gradual deployment strategy in which a small percentage of users are served the new code first. This allows for testing the new code in production without affecting all users.
  • Blue-green deployment: A blue-green deployment is a deployment strategy in which two identical environments are created: the blue environment, which is currently running, and the green environment, which is the new version. Once the green environment is ready and tested, traffic is switched from the blue environment to the green environment.
  • A/B testing: A/B testing is a deployment strategy in which two versions of the same application are deployed to different users. This allows you to compare the performance of the two versions and determine which one is better.

These are just a few of the many deployment strategies that are available. The best deployment strategy depends on specific needs and requirements.

Top comments (0)