You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spring-cloud-tencent/spring-cloud-tencent-docs/src/main/doc/spring-cloud-tencent-polari...

2.1 KiB

Spring Cloud Starter Tencent Polaris RateLimit

Module Introduction

spring-cloud-starter-tencent-polaris-ratelimit is used in Spring Cloud project joint with Polaris's rate limit component. You can access Microservice's rate limit through dependencies. Recommended using with spring-cloud-starter-tencent-polaris-discovery

Features Introduction

Service Rate Limit

Provide rate limit feature to all HTTP server.

Default introduce spring-cloud-starter-tencent-polaris-ratelimit dependencies can apply rate limit check to all HTTP server.

API Rate Limit

Provide rate limit feature to all HTTP server depending on the path level

Default introduce spring-cloud-starter-tencent-polaris-ratelimit dependencies can apply rate limit check to all HTTP server path.

User Guide

This chapter will explain how to use Polaris RateLimit in Spring Cloud project with the easiest way. Before starting MicroService, one needs to launch Polaris. Please refer to Polaris Getting Started.

  1. You can add spring-cloud-starter-tencent-polaris-ratelimits dependencies in your project to use the rate limit feature. For example, in Maven's project, add listed:
<dependency>
    <groupId>com.tencent.cloud</groupId>
    <artifactId>spring-cloud-starter-tencent-polaris-ratelimit</artifactId>
</dependency>
  1. Add rate limit configuration

Polaris provides three different configuration methods, control panel operation, HTTP API upload and local files configuration, further information please refer to Polaris service rate limit operation guide

For more details, please refer to Polaris RateLimit Example

Configuration list

Configuration Key default yes/no required Configuration Instruction
spring.cloud.polaris.ratelimit.enabled true false whether to turn on rate limit