知识卡片
自动缩放与缓存
把模型以 API 端点暴露出来只是开始:若组织开始服务更多用户,激增的需求可能迅速压垮 ML 服务/基础设施,因此实例数应随请求上升而增加、随负载下降而收缩,避免集群资源闲置并省下可观运维开支,机制与任何云环境的自动缩放类似。自动缩放通过监控目标指标(如 CPU 或内存使用率)与设定值比对来动态调整某模型的实例数,并可配置最小/最大容量与冷却期以控制扩缩行为与价格;yarnit.ai 里按语言划分的拼写纠正模块可与「基于购买历史周期性发推荐邮件」的个性化推荐模块彼此独立伸缩。缓存同样有效:预测 yarnit.ai 商品类目时,与其每次遇到「cable needles」这类重复查询都调用昂贵 ML 模型,不如缓存结果;查询量小用应用内或模型 API 服务器内的简单内存缓存即可,查询量巨大则应扩成可独立伸缩与监控的独立缓存服务。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Serving · 查看原书依据
Autoscaling Autoscaling dynamically adjusts the number of instances provisioned for a model in response to changes in the workload. Autoscaling works by monitoring a target metric (e.g., CPU or memory usage) and comparing it to a target value we monitor for.
参考来源
- 位置:《Reliable Machine Learning》第08章《Serving》(源文件:extracted/Reliable Machine Learning/_epub-src/OEBPS/ch08.xhtml)
- 结论依据:原文明确阐述该主题,并给出定义、实践或反例。
- 原始内容:Autoscaling Autoscaling dynamically adjusts the number of instances provisioned for a model in response to changes in the workload. Autoscaling works by monitoring a target metric (e.g., CPU or memory usage) and comparing it to a target value we monitor for.