0

Is it possible to support near zero downtime deployment with Azure managed PostgreSQL (either Single Server or Flexible Server)? If yes, could you please advise the best practices to implement such a set up in both single server and flexible server options?

Regards
Jacob

Jacob
  • 426
  • 3
  • 19

1 Answers1

0

There is a real chance of doing so, near zero downtime for deployment is possible with "Planned Downtime" and "Unplanned downtime"

For both the single server and flexible server, check the below steps in the links.

https://learn.microsoft.com/en-us/azure/postgresql/concepts-high-availability

https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-high-availability

Sairam Tadepalli
  • 1,563
  • 1
  • 3
  • 11
  • For planned downtime in single server, scaling up compute, scaling up storage, azure/posgresql minor version upgrades are mentioned. Do you mean to say that same behavior will apply when we do DDL/DML changes on primary server? Similarly for flexible server, it is mentioned that such planned updates will be applied to standby server first and then it will become the primary. But does this behavior apply to DDL/DML changes being applied? – Jacob Apr 25 '22 at 04:37
  • Yes, the same behavior will apply, and we need to work accordingly based on the type of server we are handling. – Sairam Tadepalli Apr 25 '22 at 04:45
  • Thanks for the details @Sairam. Just to confirm, say for single server option, if I want to apply DDL changes like altering a table or adding a new table/index etc, can I do it online while application is running without a downtime on the primary server itself? Would this immediately trigger creation of a new instance with latest changes while app is still connected to old instance? Once all connections are drained from old instance, it will be seamlessly/automatically point to the upgraded instance? Also if there is a read replica, it will get synched up as well? – Jacob Apr 25 '22 at 05:23
  • If the above is true, what should be sequence of updates? First make DB changes and the n deploy app immediately after? – Jacob Apr 25 '22 at 05:42
  • Yes, make the changes and deploy. Then the latency will be nearly zero. Follow the procedure mentioned in the document. – Sairam Tadepalli Apr 25 '22 at 09:23
  • For Single server, more details are available at this link - https://learn.microsoft.com/en-us/azure/postgresql/application-best-practices – Jacob Apr 26 '22 at 13:31