This project is a performance profiling and bottleneck analysis framework built on top of an open-source railway ticketingmicroservices system. From a big picture,our framework consists of five components:
- orchestrator:coordinate the interaction of other functional components;
- load generator: generate workload for training and profiling purpose;
- benchmark application: an opensource railway ticketing microservices system which contains 41 mi-croservices and whose request can involve up to 200 spans (You can get more details at https://github.com/FudanSELab/train-ticket/wiki);
- bottleneck discover: find all potential bottleneck services ina time-efficient way;
- performance profiler: instrumentallyprofile how a service influencing the end-to-end performanceof the requests it belongs to.
Golang
- python dependencies
pandas
sklearn
joblib
First, build the framework with:
go build
After built-up, you can choose either to train the bottleneck-discovery model or start the performance profiling and bottleneck analysis by run the project with different flags.
The input configurations are defined in train_config.json
. We have provided a template configuration in ths file. You can modify it based on your application and request types.
{
"request": [{
"name": "search_tickets",
"url": "http://35.231.88.215:32677/api/v1/travel2service/trips/left",
"body": "{\"startingPlace\": \"Shang Hai\",\"endPlace\": \"Tai Yuan\",\"departureTime\": \"2020-12-21\"}"
}],
"bearer": "",
"jaeger_ip": "35.231.88.215:32688",
"workload": [1, 10, 25, 50, 100],
"target_serv" : "ts-ui-dashboard.default"
}
- request: list of requests to generate training data. Each of them should contain the name of the request, the url of its API call, and the request body in json format
- bearer: authorization bearer token. Only provided if needed
- jaeger_ip: the IP address of Jaeger
- target_serv: the entrance service for all requests to your application, which is normally the front-end service.
go build
./easttransittenants -type=train
We provided some example training data under
/data
directory
The configurations for profiling are defined in profile_config.json
.
{
"jaeger_ip": "35.231.88.215:32688",
"request": {
"bearer": "",
"name": "search_tickets",
"url": "http://35.231.88.215:32677/api/v1/travel2service/trips/left",
"body": "{\"startingPlace\": \"Shang Hai\",\"endPlace\": \"Tai Yuan\",\"departureTime\": \"2020-12-21\"}"
},
"workload": 10,
"target_serv": "ts-travel2-service",
"precision_ms": 25
}
- jaeger_ip: the address of the Jaeger deployment, used by our jaeger client to query trace data
- request: the target request to profile
- workload: target workload level
- target_serv: the entrance service for the request to the application
- precision_ms: desired precision of the bottleneck switching boundary in milliseconds
go build
./easttransittenants -type=profile