惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
Google Online Security Blog
Google Online Security Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
T
Threat Research - Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
Lohrmann on Cybersecurity
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
Schneier on Security
Schneier on Security
S
Schneier on Security
T
Tor Project blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
WordPress大学
WordPress大学
The Hacker News
The Hacker News
Hacker News - Newest:
Hacker News - Newest: "LLM"
罗磊的独立博客
Application and Cybersecurity Blog
Application and Cybersecurity Blog
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
C
Check Point Blog
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
雷峰网
雷峰网
S
Security @ Cisco Blogs
PCI Perspectives
PCI Perspectives
Spread Privacy
Spread Privacy
W
WeLiveSecurity
SecWiki News
SecWiki News
A
About on SuperTechFans
H
Help Net Security
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
爱范儿
爱范儿
S
Securelist
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
月光博客
月光博客
Jina AI
Jina AI
博客园 - 叶小钗
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
Recent Announcements
Recent Announcements
S
Secure Thoughts
The Cloudflare Blog
美团技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - koushr

hls k8s常用命令 k8s 1.18.0安装 mysql json函数 group by的列、where的列的有效性 go基础第六篇:sync包 doris脚本 es es语法 veo ride nacos 枫叶互动 极光矩阵 富途 移卡科技 nginx高可用 k8s第一篇:k8s集群架构组件 架构设计第二篇:支付模块架构设计 可观测性体系设计第一篇:可观测性体系基本概念 架构设计第一篇:点赞模块功能设计 ES高级第一篇:倒排索引 python第一篇:基础语法 pulsar基础第二篇:命令行 pulsar基础第一篇:pulsar安装及基本概念 clickhouse第三篇:安装 clickhouse第二篇:MergeTree引擎 clickhouse第一篇:引擎 redis高阶第一篇:令牌桶算法限流 http2.0 gin入参多次获取 docker第二篇:docker安装常用中间件
山海星辰
koushr · 2026-03-18 · via 博客园 - koushr

面试时间:2026年3月17日,面试结果:一面挂。面试时觉得自己答的不错,面试完一查答案感觉自己答的像坨屎。

问题1:channel的分类,使用场景以及底层数据结构。

channel的使用场景:

1、goroutine间通信、任务分发(生产者-消费者模型,一个goroutine作为生产者,只负责往channel中放数据。另一个goroutine作为消费者,只负责从channel中取数据)。

2、实现并发控制。比如设置并发为10,每个goroutine执行时,先往channel中放数据,执行完之后再从channel取数据。当channel的长度达到10时,新的goroutine会阻塞,直到有goroutine执行完。

3、实现广播功能(channel关闭时,所有用<-从channel取数据的goroutine都会收到通知)。

4、与select、time结合,实现超时控制。

5、实现多路复用。在select块中监听多个channel,哪个case的channel能取到数据,就执行哪个case。

channel的底层数据结构:

channel在Go runtime中是由hchan结构体实现的,核心包括:环形缓冲区,用于有缓冲channel存储数据。发送/接收等待队列,存储阻塞的goroutine。互斥锁,保证并发安全。

问题2:解释GMP。短时间内产生大量goroutine会怎么样

短时间内产生大量goroutine的影响:

内存占用激增、调度开销增加、上下文切换成本上升、阻塞堆积导致系统雪崩、GC压力变大。

问题3:mysql索引数据结构。非叶子结点层有双向链表吗?索引失效场景。各种log。双1配置

非叶子结点层没有双向链表,只有叶子结点层才有双向链表。

索引失效场景:

对索引字段用了函数或计算或隐式类型转换

like以%开头

想使用联合索引,但是不满足最左前缀原则或是在中间断掉。如index(a,b,c),查询语句是where a=1 and b>2 and c=3,a会用上索引,b会用上索引(范围),c用不上索引。

索引字段值区分度不大

使用or拼接条件,但部分条件没有索引或是用不上索引,会导致整个语句用不上索引。需要改成union。

使用!=、<>、not in

问题4:redis、mongodb、es、clickhouse主要使用场景。es倒排索引

redis主要用于:热点数据缓存、队列、排行榜、计数、分布式锁、限流等

问题5:kafka如何保证数据一致性

问题6:点赞功能架构设计