文章 链接到标题 技术 链接到标题 Debounce and Throttle | Reorx’s Forge
Debounce: 将间隔不超过设定时间的多次连续调用变成一次。 Throttle: 确保一个函数被连续多次调用时,在设定时间内最多只实际执行一次。
相似之处:Debounce 和 Throttle 都限制了函数执行的最大频率不超过每设定时间一次 不同之处:在快速(间隔小于设定时间)连续调用时,Throttle 确保了函数会规律执行,但 Debounce 只有当连续调用放缓(间隔大于设定时间)时才会执行。
关于 k8s 的 zero downtime deployment 一些建议
滚动更新配置防止 502 的一些方式:
配置 liveness/readiness 配置 terminationGracePeriodSeconds 程序需要支持 graceful shutdown 主进程 pid 为 1,可以收到信号 通过配置 preStop 来保证 service endpoint 变更和 pod 删除的变更顺序 不过如果在滚动更新过程中遇到问题,需要终止,好像还是采用两套 deployment 在接入层切换多一些。
2024 State of Internal Developer Portals | Port
Developers spend significant time on non-core work and face prolonged software deployment timelines