返回介绍

3.1 云原生问题域和指南

发布于 2024-09-25 23:59:28 字数 8216 浏览 0 评论 0 收藏 0

表格 2 云开发领域问题(八类)~来自于 windows Azure

类别描述涉及模式和指南
可用性可用性指系统正常工作时间所占的比例,通常以运行时间百分比度量。 可用性受系统错误、基础结构问题、恶意攻击和系统负载的影响。 云应用程序通常向用户提供服务级别协议 (SLA),因此,它们在设计上必须能够最大程度地保持可用性。限流 、健康监控、多数据中心、基于队列的负载均衡
数据管理数据管理是云应用程序的关键要素,影响大部分质量属性。 出于性能、可伸缩性或可用性等方面的原因,数据通常托管在不同的位置并跨多个服务器,这可能会带来一系列的挑战。 例如,必须保持数据一致性,通常需要将不同位置的数据进行同步。缓存驻留、事件溯源、CQRS 命令和职责分离、索引表、物化视图、分片 、静态内容托管、令牌秘钥、Guide(缓存、数据分片、数据一致性、数据复制和同步)
设计和实现合理的设计包括很多因素(例如组件设计和部署中的一致性与连贯性)、可简化管理和部署的可维护性,以及可允许在其他应用程序和其他方案中使用的组件和子系统的可重用性。 在设计和实施阶段做出的决策对云托管应用程序和服务的质量和总拥有成本具有巨大影响。CQRS、计算资源合并、领导者选举、管道和过滤器、运行时重配、外部存储配置、静态资源托管
消息传送云应用程序的分布性要求消息基础结构在理想情况下能以松散耦合的方式连接组件和服务,从而将可伸缩性最大化。 异步消息受到广泛使用并提供了诸多好处,但也带来了许多挑战,如消息排序、有害消息管理和幂等性等。计算资源合并、管道和过滤器、优先队列、基于队列的负载均衡、调度代理管理者、Guide(异步消息)
管理和监控云应用程序在远程数据中心内运行,在此中心内,无法完全控制基础结构,或者在某些情况下无法控制操作系统。 与本地部署相比,管理和监视难度更大。 应用程序必须公开运行时信息,以便管理员和操作员管理和监视系统,支持不断变化的业务要求和定制,而无需停止或重新部署应用程序。外部存储配置、静态资源托管、健康监控、Guide(服务调用统计、)
性能和伸缩性性能是指系统在给定的时间间隔内执行任何操作的响应能力,可伸缩性则是系统能够应对负载增大且不影响性能或随时增加可用资源的能力。 云应用程序往往会遇到可变工作负载和活动高峰。 预测这些变化(尤其是在多租户方案中)几乎是不可能的。 应用程序应该能够在限制范围内扩大以满足需求高峰,并在需求减少时缩小。 可伸缩性不仅涉及计算实例,而且还涉及其他要素,例如数据存储、消息传送基础结构,等等。CQRS、缓存驻留、计算资源合并、事件溯源、物化视图、索引表、优先队列、基于队列的负载均衡、分片、限流、静态内容托管、Guide(缓存、可扩展、数据一致、数据分片)
弹性复原能力是指系统能够在发生故障后进行恰当处理,然后恢复正常。 由于云托管的性质(应用程序通常是多租户的、使用共享平台服务、争用资源和带宽、通过 Internet 通信、在市售硬件上运行),出现暂时性故障和持久性故障的可能性增大。 快速高效检测故障并恢复是保持复原能力所必需的。断路器、补偿事务、领导者选举、重试、调度代理管理者
安全性安全性是防止超出设计使用范围的恶意或意外操作,并防止泄露或丢失信息的系统能力。 云应用程序暴露在受信任的本地边界之外的 Internet 上,通常向公众开放,并可能为不受信任的用户提供服务。 应用程序的设计和部署必须防范它们受到恶意攻击,将访问权限限制给经过批准的用户,并保护敏感数据。令牌秘钥、联合身份、门卫

Dn600214.A345734E1F4CCB94342231F94DC62190

图 云应用程序开发关联的主题

表格 云应用的十大主题指南

主题描述
Asynchronous Messaging PrimerMessaging is a key strategy employed in many distributed environments such as the cloud. It enables applications and services to communicate and cooperate, and can help to build scalable and resilient solutions. Messaging supports asynchronous operations, enabling you to decouple a process that consumes a service from the process that implements the service.
Autoscaling GuidanceConstantly monitoring performance and scaling a system to adapt to fluctuating workloads to meet capacity targets and optimize operational cost can be a labor-intensive process. It may not be feasible to perform these tasks manually. This is where autoscaling is useful.
Caching GuidanceCaching is a common technique that aims to improve the performance and scalability of a system by temporarily copying frequently accessed data to fast storage located close to the application. Caching is most effective when an application instance repeatedly reads the same data, especially if the original data store is slow relative to the speed of the cache, it is subject to a high level of contention, or it is far away resulting in network latency.
Compute Partitioning GuidanceWhen deploying an application to the cloud it may be desirable to allocate the services and components it uses in a way that helps to minimize running costs while maintaining the scalability, performance, availability, and security of the application.
Data Consistency PrimerCloud applications typically use data that is dispersed across data stores. Managing and maintaining data consistency in this environment can become a critical aspect of the system, particularly in terms of the concurrency and availability issues that can arise. You frequently need to trade strong consistency for performance. This means that you may need to design some aspects of your solutions around the notion of eventual consistency and accept that the data that your applications use might not be completely consistent all of the time.
Data Partitioning GuidanceIn many large-scale solutions, data is divided into separate partitions that can be managed and accessed separately. The partitioning strategy must be chosen carefully to maximize the benefits while minimizing adverse effects. Partitioning can help to improve scalability, reduce contention, and optimize performance.
Data Replication and Synchronization GuidanceWhen you deploy an application to more than one datacenter, such as cloud and on-premises locations, you must consider how you will replicate and synchronize the data each instance of the application uses in order to maximize availability and performance, ensure consistency, and minimize data transfer costs between locations.
Instrumentation and Telemetry Guidance 远程监控指南Most applications will include diagnostics features that generate custom monitoring and debugging information, especially when an error occurs. This is referred to as instrumentation, and is usually implemented by adding event and error handling code to the application. The process of gathering remote information that is collected by instrumentation is usually referred to as telemetry.
Multiple Datacenter Deployment GuidanceDeploying an application to more than one datacenter can provide benefits such as increased availability and a better user experience across wider geographical areas. However, there are challenges that must be resolved, such as data synchronization and regulatory limitations.
Service Metering Guidance 服务计量指南You may need to meter the use of applications or services in order to plan future requirements; to gain an understanding of how they are used; or to bill users, organization departments, or customers. This is a common requirement, particularly in large corporations and for independent software vendors and service providers.

表格 4 云原生 DFX 和设计模式对照表

DFX模式名模式简介
可用性限流常用限流算法有令牌桶和漏洞(丢弃超量请求)。
 熔断器 
 断路器适用于应用持久故障。
 RETRY指定异常超时重试若干次。适用于应对瞬时故障。
 服务降级按降级粒度可分为接口、功能和服务。
 健康终端监控类似运营监控,定时监控 API/服务的存活。
安全性 包括联合身份、门卫、令牌秘钥
 联合身份类似 SSO 中的验证。
 门卫 
 令牌秘钥类似 sGov,动态验证 Token。
可扩展性ROUTE 
可修改性 包括外部配置存储、运行时重配
性能 包括缓存驻留、计算资源合并

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文