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

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.

相关推荐
毕业设计制作和分享1 小时前
springboot150基于springboot的贸易行业crm系统
java·vue.js·spring boot·后端·毕业设计·mybatis
电子_咸鱼4 小时前
LeetCode——Hot 100【电话号码的字母组合】
数据结构·算法·leetcode·链表·职场和发展·贪心算法·深度优先
仰泳的熊猫4 小时前
LeetCode:785. 判断二分图
数据结构·c++·算法·leetcode
rit84324994 小时前
基于MATLAB实现基于距离的离群点检测算法
人工智能·算法·matlab
你的人类朋友6 小时前
【Node】认识multer库
前端·javascript·后端
my rainy days6 小时前
C++:友元
开发语言·c++·算法
haoly19896 小时前
数据结构和算法篇-归并排序的两个视角-迭代和递归
数据结构·算法·归并排序
微笑尅乐6 小时前
中点为根——力扣108.讲有序数组转换为二叉搜索树
算法·leetcode·职场和发展
lang201509287 小时前
Spring Boot 官方文档精解:构建与依赖管理
java·spring boot·后端
im_AMBER7 小时前
算法笔记 05
笔记·算法·哈希算法