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

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.

相关推荐
Ares-Wang3 分钟前
Asp.net core Autofac 案例 注入、AOP 启用接口代理拦截 启用 类代理拦截=== 只会拦截虚方法
后端·asp.net
ydm_ymz3 分钟前
实验07---7-11 一维数组的次大值
c语言·数据结构·算法
2401_8570262329 分钟前
英语知识在线平台:Spring Boot框架实践
数据库·spring boot·后端
高一学习c++会秃头吗36 分钟前
leetcode_有序数组中的单一元素
数据结构·算法·leetcode
qystca1 小时前
洛谷 P1135 奇怪的电梯 C语言 bfs
数据结构·算法·宽度优先
Object~1 小时前
【第十二课】Rust并发编程(三)
开发语言·后端·rust
it噩梦2 小时前
使用argo workflow 实现springboot 项目的CI、CD
spring boot·后端·ci/cd
AskHarries2 小时前
如何使用POI-TL生成有个性的简历?
java·后端
Peter_chq2 小时前
【计算机网络】多路转接之epoll
linux·服务器·c语言·网络·c++·后端·epoll