|
| 1 | +# yaml-language-server: $schema=../../../component-metadata-schema.json |
| 2 | +schemaVersion: v1 |
| 3 | +type: middleware |
| 4 | +name: sentinel |
| 5 | +version: v1 |
| 6 | +status: alpha |
| 7 | +title: "Sentinel" |
| 8 | +description: | |
| 9 | + Use Sentinel middleware to guarantee the reliability and resiliency of your application. |
| 10 | + Sentinel is a powerful fault-tolerance component that takes "flow" as the breakthrough point and covers multiple fields including flow control, traffic shaping, concurrency limiting, circuit breaking, and adaptive system protection to guarantee the reliability and resiliency of microservices. |
| 11 | + |
| 12 | + The Sentinel HTTP middleware enables Dapr to facilitate Sentinel's powerful abilities to protect your application. You can refer to Sentinel Wiki for more details on Sentinel. |
| 13 | +urls: |
| 14 | + - title: Reference |
| 15 | + url: https://docs.dapr.io/reference/components-reference/supported-middleware/middleware-sentinel/ |
| 16 | +metadata: |
| 17 | + - name: appName |
| 18 | + type: string |
| 19 | + required: true |
| 20 | + description: "The application name for Sentinel" |
| 21 | + example: "nodeapp" |
| 22 | + - name: logDir |
| 23 | + type: string |
| 24 | + required: false |
| 25 | + description: "Directory for Sentinel log files" |
| 26 | + example: "/var/tmp" |
| 27 | + - name: flowRules |
| 28 | + type: string |
| 29 | + required: false |
| 30 | + description: "JSON array of flow control rules to limit request rate" |
| 31 | + example: | |
| 32 | + [ |
| 33 | + { |
| 34 | + "resource": "POST:/v1.0/invoke/nodeapp/method/neworder", |
| 35 | + "threshold": 10, |
| 36 | + "tokenCalculateStrategy": 0, |
| 37 | + "controlBehavior": 0 |
| 38 | + } |
| 39 | + ] |
| 40 | + - name: circuitBreakerRules |
| 41 | + type: string |
| 42 | + required: false |
| 43 | + description: "JSON array of circuit breaker rules to handle failures" |
| 44 | + example: | |
| 45 | + [ |
| 46 | + { |
| 47 | + "resource": "POST:/v1.0/invoke/nodeapp/method/neworder", |
| 48 | + "minRequestAmount": 5, |
| 49 | + "statIntervalMs": 1000, |
| 50 | + "maxAllowedRtMs": 50, |
| 51 | + "maxSlowRequestRatio": 0.5 |
| 52 | + } |
| 53 | + ] |
| 54 | + - name: hotSpotParamRules |
| 55 | + type: string |
| 56 | + required: false |
| 57 | + description: "JSON array of hotspot parameter rules for parameter-based flow control" |
| 58 | + example: | |
| 59 | + [ |
| 60 | + { |
| 61 | + "resource": "POST:/v1.0/invoke/nodeapp/method/neworder", |
| 62 | + "paramIdx": 0, |
| 63 | + "threshold": 10, |
| 64 | + "maxQueueingTimeMs": 500 |
| 65 | + } |
| 66 | + ] |
| 67 | + - name: isolationRules |
| 68 | + type: string |
| 69 | + required: false |
| 70 | + description: "JSON array of isolation rules for thread pool isolation" |
| 71 | + example: | |
| 72 | + [ |
| 73 | + { |
| 74 | + "resource": "POST:/v1.0/invoke/nodeapp/method/neworder", |
| 75 | + "maxConcurrency": 10, |
| 76 | + "maxQueueingTimeMs": 500 |
| 77 | + } |
| 78 | + ] |
| 79 | + - name: systemRules |
| 80 | + type: string |
| 81 | + required: false |
| 82 | + description: "JSON array of system protection rules for overall system protection" |
| 83 | + example: | |
| 84 | + [ |
| 85 | + { |
| 86 | + "avgRt": 50, |
| 87 | + "maxThread": 10, |
| 88 | + "qps": 20 |
| 89 | + } |
| 90 | + ] |
0 commit comments