Skip to content

translatecn/sentinel-golang

 
 

Repository files navigation

Sentinel Logo

Sentinel: The Sentinel of Your Microservices

CI Build Status codecov Go Report Card License Gitter GitHub last commit GitHub repo size GitHub closed issues

Introduction

As distributed systems become increasingly popular, the reliability between services is becoming more important than ever before. Sentinel takes "flow" as breakthrough point, and works on multiple fields including flow control, circuit breaking and system adaptive protection, to guarantee reliability and resiliency of microservices.

flow-overview

Sentinel provides the following features:

  • Rich applicable scenarios: Sentinel has been wildly used in Alibaba, and has covered almost all the core-scenarios in Double-11 (11.11) Shopping Festivals in the past 10 years, such as “Second Kill” which needs to limit burst flow traffic to meet the system capacity, throttling, circuit breaking for unreliable downstream services, distributed rate limiting, etc.
  • Real-time monitoring: Sentinel also provides real-time monitoring ability. You can see the runtime information of a single machine in real-time, and pump the metrics to outside metric components like Prometheus.
  • Cloud-native ecosystem: Sentinel Go provides out-of-box integrations with cloud-native components.

Documentation

See the 中文文档 for document in Chinese.

See the Wiki for full documentation, examples, blog posts, and other information.

If you are using Sentinel, please leave a comment here to tell us your scenario to make Sentinel better. It's also encouraged to add the link of your blog post, tutorial, demo or customized components to **Awesome Sentinel **.

Sub-projects

All integration modules and sub-projects are located in sentinel-group.

Bugs and Feedback

For bug report, questions and discussions please submit GitHub Issues.

Contributing

Contributions are always welcomed! Please see CONTRIBUTING for detailed guidelines.

You can start with the issues labeled with good first issue.

Communication

  • DingTalk Group (钉钉群): 23339422
  • Gitter

important

  • CalculateAllowedTokens 根据规则阈值 和token计算策略计算实际的阈值
  • tc.boundStat.writeOnlyMetric.AddCount(base.MetricEventPass, int64(ctx.Input.BatchCount)) 增加计数值
  • DoCheck 检查是否限流
  • sentinel.Entry 请求入口
  • BuildDefaultSlotChain 构建相应的检查逻辑

Packages

No packages published

Languages

  • Go 99.7%
  • Makefile 0.3%