# Tony Bai - 从入门到极致:VictoriaMetrics 教你写出最高效的 Go 代码 (Highlights)

## Metadata
**Review**:: [readwise.io](https://readwise.io/bookreview/57605104)
**Source**:: #from/readwise #from/reader
**Zettel**:: #zettel/fleeting
**Status**:: #x
**Authors**:: [[Tony Bai]]
**Full Title**:: 从入门到极致:VictoriaMetrics 教你写出最高效的 Go 代码
**Category**:: #articles #readwise/articles
**Category Icon**:: 📰
**URL**:: [mp.weixin.qq.com](https://mp.weixin.qq.com/s/1svEokrz5C0FwBEA88YGqw)
**Host**:: [[mp.weixin.qq.com]]
**Highlighted**:: [[2026-01-15]]
**Created**:: [[2026-01-17]]
## Highlights
- VictoriaMetrics 大量使用 sync.Pool 来复用对象,减少 GC 压力。 ([View Highlight](https://read.readwise.io/read/01keztwa3czxsq4qwq9m5xe17h)) ^977810074
- VictoriaMetrics 教你一招:**用 Channel 当对象池**,比 `sync.Pool` 更可控。 ([View Highlight](https://read.readwise.io/read/01keztwj8c6g3e1x5783zmxg14)) ^977810083
- VictoriaMetrics 将大的数据结构拆分为多个分片,每个分片有独立的锁。 ([View Highlight](https://read.readwise.io/read/01keztvjcjqfe3rhc931tapjnx)) ^977810055
- VictoriaMetrics 实现了一种**本地化优先**的 Worker Pool:每个 Worker 优先处理分配给自己的任务(通过独立的 Channel),只有在空闲时才去“帮助”其他 Worker。这种设计极大提升了多核系统的可扩展性。 ([View Highlight](https://read.readwise.io/read/01keztvw3wtqpx4dzc3j4a5gs9)) ^977810064
- VictoriaMetrics 使用带缓冲 Channel 作为信号量来实现限流。 ([View Highlight](https://read.readwise.io/read/01keztypsgrka1kbxm31zyd5na)) ^977810271