APP下载

一种完全无侵入式生产线上的全链路压力测试技术

2023-08-01陈皓张博民

现代信息科技 2023年11期

陈皓 张博民

摘  要:随着硬件性能的提升、网络带宽的增加和数据量的急剧增长,传统的单机应用已无法满足现代企业的需求,取而代之的是基于分布式的软件系统。这些软件系统在提供强大计算能力的同时,也引入了复杂性。文章介绍一种新型的基于云原生架构的生产线上全链路压力测试方法——Shadow Service,通过实现业务一致性、数据一致性、资源一致性和各种隔离性,保证了测试结果的准确性和生产系统的安全性。同时,详细介绍了如何在一个简化后的订单支付场景中使用Shadow Service实现压力测试。

关键词:生产环境;压力测试;影子服务;服务网格;云原生

中图分类号:TP311.5  文献标识码:A  文章编号:2096-4706(2023)11-0069-04

An End-to-End Pressure Testing Technology for a Completely Invasive Production Line

CHEN Hao, ZHANG Bomin

(MegaEase Inc., Beijing  100025, China)

Abstract: With the improvement of hardware performance, the big increment in network bandwidth, and the rapid growth of data volume, traditional stand-alone applications can no longer meet the needs of modern enterprises. Instead, distributed-based software systems have emerged. These software systems provide powerful computing capabilities while introducing complexity. This paper introduces a novel cloud-native architecture-based end-to-end pressure testing method for production lines—Shadow Service. By ensuring business consistency, data consistency, resource consistency, and various isolation levels, the accuracy of test results and the security of production systems are guaranteed. At the same time, it details how to use Shadow Service to achieve pressure testing in a simplified order payment scenario.

Keywords: production environment; pressure testing; shadow service; service grid; cloud native

0  引  言

在網络时代,一个大型的互联网应用需要承受数以亿计的访问量,这需要我们对应用中所有的服务进行全面完整的全链路压力测试,但这面临着巨大的挑战,传统测试方法不仅成本高昂且无法保证准确性,还需要巨大的工作量并存在破坏生产系统的风险。为了应对这些问题,MegaEase提出了Shadow Service技术,基于云原生的流量调度和Service Mesh技术,实现了业务一致、数据一致、资源一致以及业务隔离、数据隔离、流量隔离和资源隔离。这种方法不需要修改任何代码,成本低,能够保证业务逻辑与生产环境的一致性,同时可以使用生产数据进行测试,保证测试结果的准确性,且安全可靠。因此,Shadow Service成为网络时代全站压力测试的理想选择。

1  背景介绍

随着硬件性能越来越强,带宽越来越高,数据越来越多,传统的单机应用已经无法满足用户需求,取而代之的是由各种组件基于网络而构成的软件系统。……

登录APP查看全文