MicroService与数据库滚动升级 [英] MicroService with database rolling upgrade

查看:127
本文介绍了MicroService与数据库滚动升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 


我的应用程序包含许多微服务,每个微服务都有自己的数据库。有时,作为升级服务的一部分,可能需要对数据库进行更改,例如列名可能会更改或数据可能合并。 


执行滚动升级时数据库更改将执行的应用程序,但如果服务有问题并且应用程序回滚到先前版本,则对DB的更改将已执行并可能导致
问题。 


所以我想知道其他人如何管理这种情况?我显然可以在需要时进行数据库备份并恢复,但是有更好的方法吗?理想情况下,我希望能够执行滚动升级,而不必在db更新事件中将系统降低到


任何帮助都会很棒。



谢谢。 

解决方案

你在跑您的群集在Azure中还是在外部?如果在Azure中,您运行的是哪个持久性等级? 


耐久性特性的最簇


Hi, 

I have an application that contains a number of Microservices, each Microservice has it's own DB. Occasionally as part of a upgrade to a service, a change maybe needed to the DB, for example maybe a column name might change or data may be merged. 

When performing a rolling upgrade of the application the database change would carried out, but if the service had a issue and the application rolled back to the previous version the change to the DB would have already been carried out and potentially cause issues. 

So i'm wondering how other people manage this scenario? I can obviously take DB backups and restore back if needed, but is there a better way to be doing this? Ideally i want to be able to perform rolling upgrades and not have to bring the systems down in the event of a db update?

Any help would be great.

Thanks. 

解决方案

Are you running your cluster in Azure or on prem? If in Azure, what durability tier are you running? 

https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity#the-durability-characteristics-of-the-cluster


这篇关于MicroService与数据库滚动升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆