Remote Procedure Call (RPC) is a widely used abstraction for cloud computing. The programmer specifies type information for each remote procedure, and a compiler generates stub code linked into each application to marshal and unmarshal arguments into message buffers. Increasingly, however, application and service operations teams need a high degree of visibility and control over the flow of RPCs between services, leading many installations to use sidecars or service mesh proxies for manageability and policy flexibility. These sidecars typically involve inspection and modification of RPC data that the stub compiler had just carefully assembled, adding needless overhead. Further, upgrading diverse application RPC stubs to use advanced hardware capabilities such as RDMA or DPDK is a long and involved process, and often incompatible with sidecar policy control. In this paper, we propose, implement, and evaluate a novel approach, where RPC marshalling and policy enforcement are done as a system service rather than as a library linked into each application. Applications specify type information to the RPC system as before, while the RPC service executes policy engines and arbitrates resource use, and then marshals data customized to the underlying network hardware capabilities. Our system, mRPC, also supports live upgrades so that both policy and marshalling code can be updated transparently to application code. Compared with using a sidecar, mRPC speeds up a standard microservice benchmark, DeathStarBench, by up to 2.5$\times$ while having a higher level of policy flexibility and availability.
翻译:远程过程调用(RPC)是云计算中广泛使用的抽象。程序员为每个远程过程指定类型信息,编译器生成并链接到每个应用程序中的存根代码,以将参数封送进消息缓冲区并取消封送。然而,越来越多的应用程序和服务操作团队需要对服务之间的RPC流程进行高度可见性和控制,导致许多安装使用旁路实例或服务网格代理以实现可管理性和策略灵活性。这些旁路实例通常涉及检查和修改RPC数据,这是存根编译器刚刚仔细组装的,添加了不必要的开销。此外,升级各种应用RPC存根以使用先进的硬件功能,如RDMA或DPDK是一个漫长而复杂的过程,通常与旁路实例策略控制不兼容。在本文中,我们提出、实施和评估了一种新颖的方法,即将RPC封送标识和策略执行作为系统服务而不是作为库链接到每个应用程序中。应用程序按照以前的方式向RPC系统指定类型信息,而RPC服务执行策略引擎并仲裁资源使用,然后分配定制化的数据以适应底层的网络硬件功能。我们的系统mRPC还支持实时升级,以便策略和封送代码可以透明地更新到应用程序代码中。与使用旁路实例相比,mRPC可以将标准微服务基准DeathStarBench的速度提高高达2.5$\times$,同时具有更高水平的策略灵活性和可用性。