Operations 6 min read

Distributed QPS Amplifier Design in DCS_FunTester Framework

The article describes the concept, architecture, and Java implementation of a distributed request amplifier in the DCS_FunTester framework that multiplies local QPS to achieve high‑throughput performance testing without affecting the tested service's load.

FunTester
FunTester
FunTester
Distributed QPS Amplifier Design in DCS_FunTester Framework

Initially the author imagined a service that could multiply a local request by N times before sending it to the target server, allowing functional and performance test cases to be combined simply by configuring a QPS parameter (e.g., 100 QPS locally amplified to 10,000 QPS on the server).

At that time the idea was abandoned because the target service's QPS capacity was limited and building an unused service was not feasible.

With the recent update of the DCS_FunTester distributed load‑testing framework, the constraints have been resolved, and the author re‑implemented the amplifier, focusing on QPS‑based load testing rather than concurrency or thread count.

Idea

The master node receives request information and assigns it to a slave node, which executes the request the specified number of times using a simple for‑loop, without being counted in the performance test state.

The implementation does not use the performance templates of the FunTester framework because the amplification factor is small and the overall overhead is low. In the author's own tests, no major issues were encountered.

The goal is to keep the target interface's QPS under 10,000 by locally sending requests and letting the distributed system amplify them, achieving a coarse‑grained performance test.

Future work will extend support beyond HTTP to other protocols.

master node

service

Implementation method:

@Override
void runRequest(ManyRequest request) {
    def host = NodeData.getRunHost(1)
    MasterManager.runMany(host, request)
}

Utility class code:

/**
 * Run amplifier
 * @param host
 * @param request
 * @return
 */
static boolean runMany(String host, ManyRequest request) {
    String url = SlaveApi.RUN_MANY;
    def response = getPostResponse(host, url, request)
    isRight(response)
}

slave node

service

Implementation method:

@Async
@Override
public void runMany(ManyRequest request) {
    FunRequest funRequest = FunRequest.initFromJson(request.toJson());
    HttpRequestBase requestBase = funRequest.getRequest();
    Integer times = request.getTimes();
    try {
        for (int i = 0; i < times; i++) {
            FunLibrary.executeSimlple(requestBase);
        }
    } catch (Exception e) {
        FailException.fail(e.getMessage());
    }
}

The slave node uses asynchronous execution, allowing evaluation of the impact of async versus sync on service performance.

Execute Request

This part uses the FunTester framework's method to send a simple request without needing to manually close the response.

/**
 * Simple request sender, no need to call CloseableHttpResponse#close()
 *
 * @param request
 */
public static String executeSimlple(HttpRequestBase request) throws IOException {
    CloseableHttpResponse response = ClientManage.httpsClient.execute(request);
    return getContent(response.getEntity());
}

The slave node is written in Java; a pure‑Java version of DCS_FunTester may be released later.

Parameter Object

@ApiModel(value = "Single Request Amplifier Parameters")
class ManyRequest extends AbstractBean {
    private static final long serialVersionUID = -49090532920398509L;

    @Pattern(regexp = "get|post|Get|Post|GET|POST", message = "Invalid request method!")
    String requestType;

    @NotBlank
    @Pattern(regexp = "http.*", message = "Invalid request URL")
    String uri;

    @NotNull
    JSONObject args;

    @NotNull
    JSONObject params;

    @NotNull
    JSONObject json;

    @NotNull
    JSONArray headers;

    @Length(min = 10, max = 100, message = "Invalid multiplier range")
    Integer times;
}

Have Fun ~ Tester !

FunTester – a group of enthusiastic developers, Tencent Cloud & Boss certified authors, official GDevOps media partner.

FunTester Framework Architecture Overview

100k QPS: K6, Gatling vs FunTester showdown

Single‑machine 120k QPS – FunTester revenge story

Click to read more FunTester original articles.

Javaperformanceload testingdistributed systemQPS
FunTester
Written by

FunTester

10k followers, 1k articles | completely useless

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.