以有效安全的方式在正式生产环境中模拟真实流量进行全站点性能测试

What is EaseLoad

EaseLoad is a Cloud-Native performance test tool written in Go. EaseLoad aims to simulate real traffic for the whole site performance test in the production environment in an effective and safe way.

Product principle

  • Complete Safty. EaseLoad needs the o do the performance test in production. So, it could isolate the testing traffic, services, resources, middleware, and the data produced during the test to ensure there are no messed-up and minimal performance impacts for production.
  • Zero Source Code Changes: The EaseLoad is a non-intrusive design, there is no need for customers to change any source code. It can be easy to deploy and run with zero development cost.
  • Real Scenarios Simulation. Simulating the massive number of users who visit the site in parallel with the actual scenarios.
  • Easy & Reusable Test Cases. The test cases compose in a declared in YAML format, The test cases can be referenced and reused in different workflows during the life cycle of the testing product.
  • Fast Bottleneck Identifying . Leveraging the power of EaseMonitor, the test engine of EaseLoad per se is designed as a service, report metrics, tracing, and logs to EaseMonitor. EaseMonitor reports the whole invocation path and the possible bottlenecks.

Design principle

According to the product principle, the design principles are as below.

  • Cloud Native Compliance. To provide and perform perfect and safe performance, it must adopt the Cloud Native technologies and facilities, which could manage the whole service architecture - traffic, services, resources, middleware, and data.
  • Non-Intrusive Design. EaseLoad must adopt non-intrusive technologies, such as Service Mesh, JavaAgent, Service Proxy, Kubernetes, etc.
  • Declarative Performance Test. Defining the test case, workflow, and performance model in a declarative way. It's clear and easier to be maintained by version control.
  • Handy Traffic Models. Provide enough useful traffic models and users can easy to combine them to do more complicated performance test
  • Performance Analytics. Not only report the throughput, latency, and errors but also can trace the latency for all services and identify the bottlenecks quickly.

Architecture

  1. Architecture overview of the EaseLoad testing tool

    • TestCase: Manages the test case definition, verification, variable binding, and extracting. The test cases can be reused by different workflows.
    • Workflow: Manages the workflows. A workflow orchestrates a group of test cases, in series, parallel, loop, waiting, branching, etc. simulating the client's visiting and decision making.
    • Traffich Model: Defines how the traffic bursts, drops, and how long to persist in each stage.
    • Report: reports the results for load tests.
    • Test Environment: Manage the testing service endpoints, variable definitions for different environments, such as the development, test, production environment.
    • Debug Runner: running single test cases, verify the request format, response, verification, and variables defined in the test case.
    • Cluster: EaseLoad employs ETCD to save the test load definitions, splitting and expanding to a group of test nodes.
    • LoadTest Engine: Running a load test, based on the specified workflows and traffic models.
    • Client Session: Represents a Web User-Agent, maintaining the cookies, workflow status, etc. A single test node can manage millions of clients by leveraging the goroutines and extending to tens of millions or more in the cluster mode.
    • Throttle: Controls the traffic burst or drop instantly according to the traffic model definitions. It also tunes the active available connections to avoid breaking extreme conditions.
    • Metric: Statistics and reports the metrics of the testing interfaces.
  2. Architecture overview of the EaseLoad full-chain performance test

    By the support of MegaEase Cloud Native Platform. EaseLoad behaves as a downstream service to send performance testing requests to the target services.

    EaseLoad colors the traffic with testing labels, then MegaEase Cloud Native Platform is configured to route the product traffic, and testing traffic to isolated paths. The isolation is fulfilled on all levels, including:

    • ServiceMesh duplicates and isolates the service instances.
    • EasePlatform creates mirror instances for Redis, Kafka, ElasticSearch, MySQL DB and other middleware.
    • JavaAgent intercepts the requests sent to the middles and DB, changes the connections transparently, routes the colored traffic to the mirror instances.
    • EaseMonitor records metrics and traces with the coloring labels for comparing the normal product traffic and the performance testing traffic.

    All the actions, including mirror the instance, route the traffic between the service, route the request to the middleware, databases, are not required to change the source code or the normal configuration of the services. They are done by the platform without being intrusive.

Quick Start

The EaseLoad tool is delivered as a single executable binary. Currently supports Linux/amd64 and Windows/amd64.

  1. Download the latest version from https://github.com/co-megaease/easeload/releases.

  2. extract the binary to /var/tmp

    % tar -zxf -C /var/tmp easeload.tar.gz

    % cd /var/tmp

  3. Start Easeload Tool

    % export ADDR=127.0.0.1
    % export PORT=3000
    % ./easeload-server

The logs output to the terminal shows things like :

Starting application at http://127.0.0.1:3000

  1. Open http://127.0.0.1:3000 in the Chrome browser. EaseLoad started successfully if this page presented:

  2. Now we can create a single test to evaluate the EaseLoad performance test.

    1. Click the + on the left-top page, Creating a Workspace, let's name the workspace as HelloEaseLoad.

    2. Click the Test Case button on the left sidebar, Creating a test case. Let's send a request to query to the workspace list to this EaseLoad API per se.

      Method: GET EndPoint {{easeload-api}} Path: /v1/easeload/testspecs

    3. Click the Variable button on the left sidebar, filling values for the easelaod-api variable.

    4. Click on the Test Case Page again, Click send button to verify the case send successfully.

      {{easeload-api}}: http://127.0.0.1:3000

    5. Click the Workflow button on the left sidebar, adding a new workflow.

    6. Click the Traffic Model button on the left sidebar, adding a new workflow and adding the only test case to the workflow, selecting the traffic model type as Load Test.

    7. Click the Task button on the left sidebar to create a task and start the task.

    8. Click the Report button on the left sidebar to check the test result.

Most of the fields in the page are easy to understand. Refer to EaseLoad User Manual for the detailed explanation of one item if needed.

Roadmap

Check EaseLoad Roadmap for details.

User Manual

Check EaseLoad User Manual for the details.

相关推荐
追逐时光者11 小时前
快速构建一个基础、现代化的 WinForm 管理系统
后端·.net
打码人的日常分享11 小时前
基于信创体系政务服务信息化建设方案(PPT)
大数据·服务器·人工智能·信息可视化·架构·政务
铭哥的编程日记11 小时前
深入浅出蓝桥杯:算法基础概念与实战应用(三)搜索
算法·蓝桥杯·深度优先
2501_9411118911 小时前
低延迟系统C++优化
开发语言·c++·算法
小坏讲微服务12 小时前
Spring Cloud Alibaba整合SkyWalking的监控完整使用
java·微服务·架构·springcloud·监控·skywalking·java微服务
2501_9411119912 小时前
C++中的装饰器模式变体
开发语言·c++·算法
Espresso Macchiato13 小时前
Leetcode 3748. Count Stable Subarrays
算法·leetcode·职场和发展·leetcode hard·leetcode 3748·leetcode周赛476·区间求和
大袁同学13 小时前
【哈希hash】:程序的“魔法索引”,实现数据瞬移
数据结构·c++·算法·哈希算法·散列表
在人间负债^13 小时前
Rust 实战项目:TODO 管理器
开发语言·后端·rust