Spring Cloud Gateway 动态配置
Spring Cloud Gateway 的route路由配置需要能够灵活添加修改才有使用价值。
在线系统发布策略
Online project publishing generally has the following schemes:
-
Downtime release
This kind of release is usually released at night or during major version upgrade. Because it needs to be stopped, now everyone is studying Devops scheme. -
Blue green deployment
Blue green deployment requires two identical environments. A new version of the environment, an old version of the environment, switches and rolls back through load balancing in order to reduce the service stop time. -
Rolling deployment
Rolling deployment is to start a new version, then stop an old version, then start a new version, and then stop an old version until the upgrade is completed. The default upgrade scheme based on k8s is rolling deployment. -
Grayscale release
Gray publishing is also called Canary publishing. In gray publishing, routing weights are often set according to users. For example, 90% of users keep using the old version, and 10% of users try the new version. Different versions of applications coexist and are often used together with A/B tests to test and select multiple schemes.
多实例部署时配置刷新策略
- 要保持每个实例配置的稳定, 例如实例重启后, 配置不改变。
- 多实例配置要保持一致。
- 网关实例要部署在Openshift平台上, 配置获取不能从数据库获取。
参考网址:
https://docs.vmware.com/en/VMware-Spring-Cloud-Gateway-for-Kubernetes/index.html
https://www.jianshu.com/p/6ef55cfb2b81
https://www.tutorialspoint.com/spring_cloud/spring_cloud_gateway.htm
https://github.com/zulffaza/Spring-Cloud-Gateway-Routes-from-Database
https://huaweicloud.youkuaiyun.com/63311441d3efff3090b518a9.html?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7Eactivity-1-86557165-blog-127522710.pc_relevant_vip_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7Eactivity-1-86557165-blog-127522710.pc_relevant_vip_default&utm_relevant_index=2
https://blog.youkuaiyun.com/lazasha/article/details/84942823?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERate-2-84942823-blog-127522710.pc_relevant_vip_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERate-2-84942823-blog-127522710.pc_relevant_vip_default&utm_relevant_index=3
本文围绕 Spring Cloud Gateway 展开,强调其 route 路由配置需灵活添加修改。介绍了在线系统发布策略,如停机发布、蓝绿部署、滚动部署、灰度发布等。还提及多实例部署时的配置刷新策略,包括保持实例配置稳定、一致,且网关实例部署在 Openshift 平台时不从数据库获取配置。
8801

被折叠的 条评论
为什么被折叠?



