ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
137 stars 58 forks source link

Investigate on the high error rate in interceptor passthrough load test #6878

Closed TharmiganK closed 1 month ago

TharmiganK commented 1 month ago

Description:

$Subject

This is with the update 10 pack

TharmiganK commented 1 month ago

Tested with the update 10 RC pack, and noticed that the number of threads are increasing for a simple passthrough service.

Passthrough service:

import ballerina/http;

listener http:Listener serverEP = new (9091);

const string CLIENT_URL = "http://localhost:9090";
final http:Client testClient = check new (CLIENT_URL);

service /passthrough on serverEP {

    isolated resource function get .() returns http:Response|error {
        return testClient->/greeting;
    }
}

Backend service:

import ballerina/http;

service on new http:Listener(9090) {
    resource function get greeting() returns string {
        return "Hello, World!";

    }
}

Output with update 10 RC1 pack:

Screenshot 2024-08-15 at 13 44 45

Output with Ballerina SwanLake 2201.9.2:

Screenshot 2024-08-15 at 13 42 31

Note: This might not be related to the interceptor load test error rate issue

TharmiganK commented 1 month ago

The additional threads are created for connection eviction task(implemented via: https://github.com/ballerina-platform/module-ballerina-http/pull/2066) but those should not be created for a downgraded HTTP/1.1 connection

TharmiganK commented 1 month ago

Fixed with the linked PR