Commit Graph
37 Commits
Author SHA1 Message Date
zhangwenjian 1bc2e22833 fix🐛: give the config templates the defaults a deployment actually needs
Two settings that decide whether a deployment survives load, neither of which
appeared in any template.

The connection pool. Left unset, Go's defaults apply, and MaxIdleConns is 2:
under load almost every request opens a TCP connection and closes it again,
local ports run out, and the process answers "can't assign requested address"
to everything. Not slower - unavailable. A sweep against MySQL collapsed to
zero successful responses at 64 concurrent requests without these, and served
13,846 req/s with no errors once they were set.

The queue buffer. poolSize is the point at which messages start being dropped,
not a tuning knob: a full queue discards the message and returns an error
rather than blocking, and each stream has one consumer goroutine writing to the
database. At the previous default of 100 a load test lost over 60% of them; at
1000, none. Login and operation logs travel this queue, so what gets lost is
audit data - though only when logger.enableddb is on.

Both carry the reasoning in the file, because the failure mode of each is
invisible until it happens in production.
2026-08-28 19:42:38 +08:00
zhangwenjian cd8edfa5d4 fix🐛: reject rate-limited requests with 429 and make the threshold configurable
A rejected request answered 200 with the failure only in the body, so every
layer that reads the status line counted it as served: load balancers, metrics,
client-side retry. A load test against this reported the limiter's own
rejections as successful traffic and overstated throughput more than tenfold.

The threshold was a constant in the middleware, which made 200 QPS the ceiling
of every deployment with nothing in the configuration to reveal it. It now
reads extend.rateLimit.inboundQPS; an absent value keeps 200, so an upgrade
changes nothing, and zero disables the limiter for a deployment behind its own
gateway.

Also drops Strategy: system.BBR. Reading sentinel's source, the adaptive
strategy is consulted only for Load and CpuUsage - for InboundQPS the trigger
count is compared directly - so it read as if the limit adapted to the machine
when it never did.
2026-08-28 19:42:21 +08:00
zhangwenjian c66cb5c6a8 fix: correct the commented-out queue.redis sample in settings.yml
The sample had producer/consumer nested keys (streamMaxLength,
approximateMaxLength, visibilityTimeout, bufferSize, concurrency,
blockingTimeout, reclaimInterval) that don't exist on config.RedisQueue —
checked against sdk/config/queue.go, which only reads addr, password, and the
embedded RedisOptions fields, plus group, key_prefix and max_attempts. Filling
in the old sample as written would compile and start fine, since it's YAML
under a key the struct doesn't declare, and every one of those settings would
be silently ignored.

Replaced with the fields the struct actually has. Still commented out —
redis stays opt-in, this only fixes what filling it in would produce.
2026-08-20 10:54:53 +08:00
wenjianzhang d02b52f383 feat: 添加sqlserver支持 2022-02-08 18:41:09 +08:00
zhangwenjian c74080664f refactor🎨: update version 2021-07-14 22:24:26 +08:00
G-Akiraka 25d7323ed1 Update settings.yml 2021-07-02 09:05:25 +08:00
zhangwenjian 16923017b2 refactor🎨: 配置文件默认使用memory cache 2021-06-30 22:35:29 +08:00
zhangwenjian 3fd34db3c1 docs📝: 修改接口文档 2021-06-29 16:30:47 +08:00
zhangwenjian dad4b4cca8 refactor🎨: 添加redis配置 2021-06-07 16:40:43 +08:00
wenjianzhang b21f665760 feat 添加队列和缓存的默认配置信息 2021-05-24 18:40:57 +08:00
wenjianzhang 44d196eaef config🔧 :修改配置文件 2021-04-27 10:06:22 +08:00
wenjianzhang 14db1e802c feat : 添加字段验证 2021-04-08 18:43:17 +08:00
wenjianzhang 221a47423d fix🐛 :修改扩展配置文件名称 2021-04-08 17:17:13 +08:00
wenjianzhang 3767274755 config🔧 :修改配置文件 2021-03-31 19:09:47 +08:00
linwenxiang e2952fa393 调整整体架构写法
调整db用法
调整日志用法
调整模版
2021-03-04 23:45:16 +08:00
zhangwenjian 54f48377f0 feat:added auto job 2020-08-06 22:30:57 +08:00
zhangwenjian 1a580366fc feat : enabledbus status to true 2020-08-01 10:52:49 +08:00
zhangwenjian b64dfe9aa4 config : update config 2020-07-27 22:38:37 +08:00
wenjianzhang f3adadd6ef feat:update log 2020-07-24 18:10:25 +08:00
zhangwenjian ca62b4ef1d feat:Code generation upgrade(#173) 2020-07-23 14:07:57 +08:00
zhangwenjian 426cec1b62 fix: Fix spelling errors 2020-07-23 11:59:47 +08:00
wenjianzhang 6f111ce9f1 feat:Code generation configuration item 2020-07-22 17:22:55 +08:00
wenjianzhang 916e30005f feat: update system 2020-07-06 18:13:29 +08:00
wenjianzhang 8a1614f64d feat:Extraction of configuration parameters 2020-07-06 13:53:15 +08:00
zhangwenjian bfbc5081ea feat:Extract global configuration 2020-07-06 07:53:34 +08:00
zhangwenjian a6970e9c67 feat: Database type support 2020-07-03 00:34:54 +08:00
zhangwenjian b77f4b5a1b feat: add global & logger 2020-06-19 22:09:49 +08:00
zhangwenjian 0177fb17b7 feat[Https]: added https support (#113) 2020-06-11 23:56:05 +08:00
zhangwenjian a252264868 Remove configuration that is no longer in use 2020-05-09 01:00:56 +08:00
zhangwenjian 8faff5384f 添加js模板,页面模板,去掉数据库数据初始化,去掉sql文件中没用语句 2020-05-01 14:25:14 +08:00
zhangwenjian a2f4c00246 结构调整添加cmd 2020-04-18 10:06:44 +08:00
kikiyou f091f8c24d update sqlite db file 2020-04-14 17:06:30 +08:00
zhangwenjian 531cc6926d 添加jwt配置 2020-04-13 00:11:29 +08:00
zhangwenjian ef5a1681ed 修复配置文件问题 2020-04-08 15:23:43 +08:00
yangcuiwang b626314b58 更新配置 2020-04-03 21:44:47 +08:00
wenjianzhang c0e10313f3 Update settings.yml 2020-03-23 12:26:49 +08:00
zhangwenjian e027e6a259 update project path 2020-03-18 23:09:37 +08:00