Erica Hughberg: 我在Tetrate担任社区推广员,我的工作是倾听业界人士的意见,确保我们构建的解决方案能够真正满足人们的需求。互联网及其应用的通信方式在过去二十多年里发生了显著变化。从早期基于线程的代理到事件驱动的代理,再到微服务架构,以及现在由生成式AI带来的新挑战。早期基于线程的代理在处理大量并发连接时效率低下,事件驱动的代理通过共享线程和异步处理解决了C10K问题,提高了效率。微服务架构将大型单体应用分解成更小的、独立的服务,提高了资源利用效率,但也带来了新的网络挑战。Kubernetes等容器编排技术使得服务动态迁移,这给代理带来了新的挑战,需要动态更新代理配置以适应服务的移动。Envoy Proxy等动态代理应运而生。生成式AI应用的兴起带来了新的挑战:模型响应速度慢、模型体积大,与以往优化小型、快速工作负载的模式不同。应对生成式AI带来的大模型工作负载,一个有趣的方面是如何将轻量级模型部署到网络边缘,以提高响应速度。生成式AI带来的网络流量变大,请求和响应体积增大,这给网络安全带来了新的挑战,需要对请求和响应内容进行安全检查。生成式AI API 的开放性和非确定性给网络基础设施带来了新的挑战,需要处理更大的请求和响应,以及更长的响应时间。生成式AI服务的流式响应与传统流媒体服务不同,需要对输出进行安全检查,这增加了复杂性。为了应对生成式AI带来的挑战,需要改进现有的网关技术,例如使用Envoy Proxy等高性能代理来处理大量并发连接,并结合Python等脚本语言进行智能化处理。Envoy Proxy 通过其事件驱动架构能够有效处理大量并发连接,而 Python 编写的网关在处理大规模并发连接时会遇到瓶颈。将 Envoy Proxy 与 Python 扩展结合,可以兼顾高性能和灵活的智能化处理。处理生成式AI流量需要在网络层面和模型调用层面进行多层次的优化,例如智能路由、动态扩展等。Envoy Proxy 的架构能够有效地支持这种多层次的优化。Envoy AI Gateway 在 Envoy Proxy 的基础上,提供了控制平面和扩展机制,简化了配置和管理,并针对生成式AI应用场景进行了优化。Envoy AI Gateway 项目是一个开源项目,鼓励机器学习和生成式AI工程师参与贡献,共同解决生成式AI流量带来的挑战。在POC阶段,人们应该尝试各种可能性,但不要过早地进行大规模扩展。Envoy Gateway 1.3版本中已经加入了动态使用限制的功能,这不仅对生成式AI应用有益,也适用于其他类型的API。
Demetrios: 作为主持人,我与Erica的对话中了解到互联网和计算机技术的一些演变,以及大型语言模型如何改变了互联网的现状。
supporting_evidences
Erica Hughberg: 'So I do think it's helpful to sometimes take many steps back to how the networking of the internet and how our applications are communicating over the last... since 2010, really. Or even before, no, before then. Since the early 2000s'
Erica Hughberg: 'So now we're taking a long old step back. And then during this microservices era was also cool. When we start to optimize, we want to do loads of little requests and they're light and they're fast.'
Erica Hughberg: 'Yeah, so that also was really interesting is the workloads for, that's an entire topic on itself, like how to manage the LLM workloads in your compute.'
Erica Hughberg: 'Have you noticed a lot of AI or ML engineers starting to come into the Envoy AI Gateway project and submit PRs?'
This chapter explores the evolution of internet architecture, from thread-based proxies struggling with scaling to event-driven proxies and the rise of microservices. It highlights the shift from large monoliths to smaller, more scalable services and the challenges this presented for networking.
Shift from thread-based to event-driven proxies to handle increased concurrent connections.
Evolution from monolithic applications to microservices for better scalability.
Introduction of Kubernetes for dynamic resource allocation and the challenges it posed for networking.