流控降级中间件[ Sentinel 1.7.0 ](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fgithub.com%2Falibaba%2FSentinel%2Freleases%2Ftag%2F1.7.0)版本正式发布,引入了 Envoy 集群流量控制支持、properties 文件配置、Consul/Etcd/Spring Cloud Config 动态数据源适配等多项新特性与改进。详细特性列表请参考 [Release Notes](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fgithub.com%2Falibaba%2FSentinel%2Freleases%2Ftag%2F1.7.0),欢迎大家使用并提出建议。
下面我们来一起探索一下 Sentinel 1.7.0 的重要特性。
Envoy 集群流量控制
------------
[Envoy](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fwww.envoyproxy.io%2F) 目前广泛用作 Service Mesh 的数据平面,作为 sidecar 承担路由和流量转发等任务。在 Service Mesh 中集群流量控制是保障整个集群稳定性必不可少的一环,因此 Sentinel 1.7.0 提供了 [Envoy Global Rate Limiting gRPC Service](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fwww.envoyproxy.io%2Fdocs%2Fenvoy%2Flatest%2Fintro%2Farch_overview%2Fother_features%2Fglobal_rate_limiting%23arch-overview-rate-limit) 的实现 —— [Sentinel RLS token server](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fgithub.com%2Falibaba%2FSentinel%2Ftree%2Fmaster%2Fsentinel-cluster%2Fsentinel-cluster-server-envoy-rls),借助 Sentinel 集群限流 token server 来为 Envoy 服务网格提供集群流量控制的能力。
![68639837_d2266980_0540_11ea_8997_05084e2e47bb](https://yqfile.alicdn.com/20b6b3f8b5ab18e0cf45d417adb0b5552880fd33.png)
Envoy RLS Sentinel overview
---------------------------
用户只需要拉起 Sentinel RLS token server 实例并配置集群流控规则,然后在 Envoy 中进行相应的配置即可快速接入 Sentinel 的集群限流。集群流控规则项与 Envoy 的 [rate limit action](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fwww.envoyproxy.io%2Fdocs%2Fenvoy%2Flatest%2Fapi-v2%2Fapi%2Fv2%2Froute%2Froute.proto%23envoy-api-msg-route-ratelimit) 生成的 descriptor 相对应,支持 source\_cluster、destination\_cluster、request\_headers、remote\_address、generic\_key 等几种策略(支持组合)。示例规则项:
```
domain: foo
descriptors:
- resources:
- key: "destination_cluster"
value: "service_aliyun"
count: 1
- resources:
- key: "remote_address"
value: "30.40.50.60"
count: 10
```
![](data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==)![](data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== "点击并拖拽以移动")
上面的示例配置了两条规则,针对的 domain 都是 foo(与 Envoy 的配置相对应),其中一条规则会对所有目标为 service\_aliyun 集群的请求进行控制,QPS 最大为 1;另一条规则控制所有来源 IP 为 30.40.50.60 的请求每秒不超过 10 次。
我们提供了 [Sentinel RLS token server 在 Kubernetes 环境的示例](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fgithub.com%2Falibaba%2FSentinel%2Ftree%2Fmaster%2Fsentinel-cluster%2Fsentinel-cluster-server-envoy-rls%2Fsample%2Fk8s),方便大家在 K8s 集群中快速体验 Sentinel 集群限流的能力。
在后续的版本我们还会改进规则动态配置的方式,支持 Kubernetes CRD 的形式配置规则,同时结合 [Sentinel C++](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fgithub.com%2Falibaba%2Fsentinel-cpp) 版本提供原生的 Envoy Filter。未来我们还会提供 Istio 的支持,让 Sentinel 在 Service Mesh 中发挥更为重要的作用。
properties 文件配置支持
-----------------
Sentinel 1.7.0 优化了加载[启动配置项](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fgithub.com%2Falibaba%2FSentinel%2Fwiki%2F%25E5%2590%25AF%25E5%258A%25A8%25E9%2585%258D%25E7%25BD%25AE%25E9%25A1%25B9)的方式,支持将配置项直接配置在 properties 文件中。用户只需要通过 -Dcsp.sentinel.config.file 参数配置 properties 文件的路径即可,从而简化了通用配置的方式。
动态数据源适配
-------
Sentinel 1.7.0 新增了以下三种动态数据源的支持,用户可以利用这些动态数据源保存、拉取规则:
* [Etcd 数据源](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fgithub.com%2Falibaba%2FSentinel%2Ftree%2Fmaster%2Fsentinel-extension%2Fsentinel-datasource-etcd)
* [Consul 数据源](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fgithub.com%2Falibaba%2FSentinel%2Ftree%2Fmaster%2Fsentinel-extension%2Fsentinel-datasource-consul)
* [Spring Cloud Config 数据源](https://yq.aliyun.com/go/articleRenderRedirect?url=https%3A%2F%2Fgithub.com%2Falibaba%2FSentinel%2Ftree%2Fmaster%2Fsentinel-extension%2Fsentinel-datasource-spring-cloud-config)
至此,Sentinel 已经支持了七种常用的配置中心,可以覆盖大部分的规则推送场景。
Start hacking
-------------
值得注意的是,Sentinel 1.7.0 有近一半的特性都是由社区开发者贡献的,许多的特性都是社区里面进行充分讨论和 review 后出炉的,因此我们可以称 Sentinel 1.7.0 是一个社区一起定义的版本。我们非常欢迎大家持续参与社区贡献,一起来参与未来版本的演进。若您有意愿参与社区贡献,可以参考 贡献指南 来入门,同时也欢迎联系我们加入 Sentinel 核心贡献小组认领任务。积极参与贡献的开发者我们会重点关注,有机会被提名为 Committer。Now start hacking!
[原文链接](https://yq.aliyun.com/articles/726761?utm_content=g_1000089748)
本文为云栖社区原创内容,未经允许不得转载。
分享到:
相关推荐
sentinel-1.7.0.zip 内包含jar包和一件启动bat脚本
sentinel-dashboard-1.7.0在github上下载很慢,共享到CSDN上来,放心下载真实有效
sentinel-1.7.0.rarsentinel-1.7.0.rarsentinel-1.7.0.rarsentinel-1.7.0.rarsentinel-1.7.0.rarsentinel-1.7.0.rarsentinel-1.7.0.rarsentinel-1.7.0.rarsentinel-1.7.0.rarsentinel-1.7.0.rarsentinel-1.7.0....
sentinel-dashboard-1.7.1.jar 下载慢的朋友们可以点此下载,github下载太慢了
丰富的应用场景:Sentinel 承接了阿里巴巴近 10 年的双十一大促流量的核心场景,例如秒杀(即突发流量控制在系统容量可以承受的范围)、消息削峰填谷、集群流量控制、实时熔断下游不可用应用等。 完备的实时监控:...
2019 年,Sentinel 朝着多语言扩展的方向不断探索,推出 C++ 原生版本,同时针对 Service Mesh 场景也推出了 Envoy 集群流量控制支持,以解决 Service Mesh 架构下多语言限流的问题。 2020 年,推出 Sentinel Go ...
sentinel-dashboard-1.7.0.jar 环境:JDK 运行:(-Dserver.port=8080指定端口) 1. java -Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8080 -Dproject.name=sentinel-dashboard -jar sentinel-...
Sentinel(Sentinel-1.7.0.tar.gz、Sentinel-1.7.0.zip、sentinel-dashboard-1.7.0.jar、sentinel-envoy-rls-token-server-1.7.0.jar)随着微服务的流行,服务和服务之间的稳定性变得越来越重要。Sentinel 以流量为...
sentinel1.7.0 jar包
sentinel-dashboard-1.7.0.jar包,网上下载实在是慢。这个版本是比较新的,1分提供给后面需要的。算是辛苦费吧,
随着微服务的流行,服务和服务之间的稳定性变得越来越重要。Sentinel 以流量为切入点,从流量控制、熔断降级、系统负载保护等多个维度保护服务的稳定性。
Sentinel 提供一个轻量级的开源控制台,它提供机器发现以及健康情况管理、监控(单机和集群),规则管理和推送的功能。是一款面向云原生微服务的高可用流控防护组件。
sentinel-dashboard-1.7.0.jar gitHub资源.zip
redis-sentinel(哨兵机制)集群安装包,解压即可使用;在linux环境上快速搭建一个简单的基于哨兵模式的redis集群
springcloud alibaba 控制台,已改造。支持搭配注册中心配置持久化(网关,流控,降级,热点等)
workshop专场微服务专场开发者动手实践营微服务使用Sentinel进行微服务流量控制.pdf
Sentinel 承接了阿里巴巴近 10 年的双十一大促流量的核心场景,例如秒杀、冷启动、消息削峰填谷、集群流量控制、实时熔断下游不可用服务等,是保障微服务高可用的利器,原生支持 Java/Go/C++ 等多种语言,并且提供 ...