Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Update code on production env where we have live users all time

Our app is in prod mode now.

How can I update the server code?

Issue: It might have a chance that someone is accessing a server or doing some CRUD.
It may impact the data and we have some payment-related things as well.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

A reasonably easy and straight-forward way is a blue-green deployment. (Unlike what the Wikipedia article says, the instances don’t need to be physical servers, just app instance listening on multiple ports on the same server, for instance.
)

Assuming you’d be upgrading from version 1 to version 2:

  • Your frontend load balancer (e.g. ELB) directs traffic to version 1.
  • You deploy version 2.
  • You configure ELB to start directing traffic to version 2 and stop directing to version 1.
  • Once there is no traffic to version 1, you shut it down.

Extra care must of course be taken if version 2 involves e.g. database schema changes that aren’t compatible with version 1.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading