What’s New in Alibaba Sentinel 1.8.7? Regex Rules, Prometheus Metrics, and Future Roadmap
Alibaba Sentinel 1.8.7 introduces regex‑based resource matching, Prometheus metric export, default circuit‑breaker rules, and an enhanced RateLimitController, while outlining the upcoming 2.0 features such as traffic routing, traffic coloring, and self‑healing capabilities for cloud‑native microservices.
Basic Introduction
Sentinel is an open‑source traffic‑governance component from Alibaba, designed for distributed, multi‑language microservice architectures. It has powered Alibaba’s high‑traffic scenarios for over 15 years, including flash sales, cold‑start protection, traffic shaping, cluster flow control, and real‑time circuit breaking, and is widely adopted in production.
Version Preview
Sentinel 1.8.7 was recently released, adding several new features and improvements:
Support for regex‑based resource name matching, enabling batch rule configuration.
Traffic metrics integration with Prometheus.
Default circuit‑breaker rules.
Refactored RateLimitController with higher accuracy and support for maxQps thresholds above 1000.
Regex Resource Name Support
Earlier versions required explicit resource names for rule configuration, which made batch configuration cumbersome. Version 1.8.7 adds the ability to define resources using regular expressions, simplifying bulk rule management.
Example (see sentinel-demo-basic → FlowQpsRegexDemo class):
// Match resource names that start with "/A/"
private static final String KEY = "/A/.*";
private static void initFlowQpsRule() {
List<FlowRule> rules = new ArrayList<FlowRule>();
FlowRule rule1 = new FlowRule();
rule1.setResource(KEY);
// set limit qps to 20
rule1.setCount(20);
rule1.setGrade(RuleConstant.FLOW_GRADE_QPS);
rule1.setRegex(true);
rule1.setLimitApp("default");
rules.add(rule1);
FlowRuleManager.loadRules(rules);
}When sending requests to /A/a, /A/c, and /B/a, only the first two match the regex and are limited to 20 QPS, while /B/a passes all traffic, confirming the feature works as expected.
90 /A/a send qps is: 375, total:375, pass:20, block:355
90 /A/c send qps is: 370, total:370, pass:20, block:350
90 /B/a send qps is: 383, total:383, pass:383, block:0Prometheus Metric Export
Previously, Sentinel metrics could only be viewed via logs or the console. Version 1.8.7 adds native Prometheus support, exposing metrics through an exporter.
To enable Prometheus metrics, add the following Maven dependencies:
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-prometheus-metric-exporter</artifactId>
<version>1.8.7</version>
</dependency>
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_httpserver</artifactId>
<version>0.3.0</version>
</dependency>Configure Prometheus to scrape the Sentinel metrics endpoint (default port is configurable via csp.sentinel.prometheus.fetch.port):
scrape_configs:
- job_name: 'sentinelMetrics'
static_configs:
- targets: ['localhost:9092']
# Note: the port must match the Sentinel configuration.The resulting dashboard shows the exported Sentinel metrics (see image below).
Community Future Plans
Both the 1.8.x line and the upcoming 2.0 series will continue to evolve in parallel. The community is encouraged to join the Sentinel group (DingTalk group number 21977771) to contribute.
1.8.x Roadmap
The 1.8.x series will keep deepening traffic‑protection capabilities, optimizing core structures, mechanisms, and models, while preparing a smooth transition to Sentinel 2.0.
2.0 Vision
Sentinel 2.0 will shift from “traffic protection” to “traffic governance and self‑healing”, expanding coverage from runtime stability to change‑state stability across the entire service lifecycle. Planned capabilities include traffic routing, traffic coloring with label propagation, abnormal‑traffic scheduling, and warm‑up weight adjustment.
Related link: https://github.com/alibaba/Sentinel/releases/tag/1.8.7
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Native
We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
