Files
martial-tool/blade-starter-actuate/README.md
2025-11-28 16:23:32 +08:00

34 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 想法
暴露一些端点,提供一些功能。
1. http-cache
2. RateLimiter
3. ... ...
### 不是用网关,单体应用
拦截器处理,基于 redis 的 cache 时间或者 RateLimiter处理。
结构serviceName:http-cache:/user/1?queryString If-Modified-Since
结构serviceName:RateLimiter:/user/1 99
### 使用网关
将端点信息存储到 redis 里,供 网关使用。
结构serviceName:http-cache:endpoint:/user/{id} 100s
结构serviceName:RateLimiter:endpoint:/user/{id} 100/s
## RateLimiter Headers
```text
#=============================#===================================================#
# HTTP Header # Description #
#=============================#===================================================#
| X-RateLimit-Limit | Request limit per day / per 5 minutes |
+-----------------------------+---------------------------------------------------+
| X-RateLimit-Remaining | The number of requests left for the time window |
+-----------------------------+---------------------------------------------------+
| X-RateLimit-Reset | The remaining window before the rate limit resets |
| | in UTC epoch seconds |
+-----------------------------+---------------------------------------------------+
```