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

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.

相关推荐
yyueshen3 分钟前
RabbitMQ系列(一)架构解析
分布式·架构·rabbitmq
吃海鲜的骆驼3 分钟前
服务异步通讯与RabbitMQ
java·分布式·后端·rabbitmq
m0_748233645 分钟前
RabbitMQ 进阶
android·前端·后端
m0_7482386314 分钟前
Spring Boot项目接收前端参数的11种方式
前端·spring boot·后端
桦说编程16 分钟前
【硬核总结】如何轻松实现只计算一次、惰性求值?良性竞争条件的广泛使用可能超过你的想象!String实际上是可变的?
后端·函数式编程
清羽_ls42 分钟前
leetcode 912. 排序数组
数据结构·算法·leetcode
深度Linux1 小时前
深入探讨Ceph:分布式存储架构的未来
分布式·ceph·架构·c/c++
萌の鱼1 小时前
leetcode 3183. 达到总和的方法数量
数据结构·c++·算法·leetcode
计算机小白一个1 小时前
蓝桥杯 Java B 组之最短路径算法(Dijkstra、Floyd-Warshall)
java·数据结构·算法·蓝桥杯
紫菜(Nori)1 小时前
短连接服务器压测-wrk
服务器·压力测试