A single-binary cross-platform lightweight client/server connection testing tool.

conntest

A single-binary cross-platform lightweight client/server connection testing tool. Currently supports L7 TCP (HTTP).

Configuration Options

  • concurrency: The number of concurrent connections to make
  • description: The description of the test
  • run_count: The number of times to run the test
  • client_delay_ns: Optional client-side delay to introduce, in nanoseconds
  • server_delay_ns: Optional server-side delay to introduce, in nanoseconds
  • upstream_endpoint: Optional endpoint upstream to server, which server will GET on each client request
  • data: Optional data to send to the server. Default is uuid.

Usage

Remote Server

Start conntest in server mode on the remote instance.

conntest server -p 8080

Local Client

Make a request to the server to create a test plan.

# set CONNTEST remote endpoint
export CONNTEST=http://conntest-server:8080
# create a new test group, storing the response in a variable
RESP=`curl $CONNTEST/test-groups/create -d '{
	"description": "example test group",
	"run_count": 1000
	"concurrency": 5,
	"client_delay_ns": 100,
	"upstream_endpoint": "https://internal.example.net",
	"server_delay_ns": 0
}'`
# export the run_group_id from the response JSON
export run_group_id=`echo $RESP | jq -r '.run_group_id'`

The server will respond with a run_group_id.

Now, start conntest in client mode, providing the remote server endpoint, the run group ID to run, and the path where to generate the report file.

conntest client -r $CONNTEST -g $run_group_id -f report.json -d "$(<data.txt)"

Results

Upon completion of a test, conntest will iterate over the client and server results to determine if there are any discrepancies in the data sent by the client and reported received by the server. If there are discrepancies, the test will fail. The average round trip time (as seen from the client perspective) is reported, as well as the raw round trip times for each request.

After completing a test run, the client will store the results in a local JSON file.

Analyzing Results

Get Average Response Time (in nanoseconds)

REPORT_FILE=report.json
jq '.average_response_time_ns' $REPORT_FILE

Find Any Errors

jq '.results[] | select(.error != null)' $REPORT_FILE

Get All Durations

jq '.results |=sort_by(.run_count)|.results[]|.client_duration_ns' $REPORT_FILE

Create Graph of Durations

export SCRIPTS_DIR=scripts
export REPORT_FILE=report.json
bash scripts/plot.sh
open roundtrip-plot.png
Owner
robert lestak
nextgen architect. automate everything.
robert lestak
Similar Resources

Client for the cloud-iso-client

cloud-iso-client Client for the cloud-iso-client. Register an API token Before using this client library, you need to register an API token under your

Dec 6, 2021

Go-http-client: An enhanced http client for Golang

Go-http-client: An enhanced http client for Golang

go-http-client An enhanced http client for Golang Documentation on go.dev 🔗 This package provides you a http client package for your http requests. Y

Jan 7, 2023

Nutanix-client-go - Go client for the Nutanix Prism V3 API

nutanix-client-go This repository contains portions of the Nutanix API client code in nutanix/terraform-provider-nutanix. It has been extracted to red

Jan 6, 2022

Aoe4-client - Client library for aoe4 leaderboards etc

AOE4 Client Overview This is a go client used to query AOE4 data from either the

Jan 18, 2022

Balabola-go-client - GO client for Yandex balabola service

Balabola GO Client GO client for Yandex balabola service Yandex warning The neur

Jan 29, 2022

A very simple local client-server calculator project built using Cobra and socket programming, written in Go.

Golculator Introduction A very simple local client-server calculator project built using Cobra and socket programming, written in Go. Setup and run Fi

Apr 3, 2022

Client-Server Expression Evaluator with Persistent Database Support (Redis & SQL)

Client-Server-Expression-Evaluator Client-Server Expression Evaluator with Persistent Database Support (Redis & SQL). Client-Server Expression Evaluat

Jan 4, 2022

Elastos.ELA.Rosetta.API - How to write a Rosetta server and use either the Client package or Fetcher package to communicate

Examples This folder demonstrates how to write a Rosetta server and how to use e

Jan 17, 2022

Pokemon Unite scoreboard HUD and extra tools running over captured game feeds using the OpenCV video processing API and Client/Server architecture.

Pokemon Unite scoreboard HUD and extra tools running over captured game feeds using the OpenCV video processing API and Client/Server architecture.

unite Pokemon Unite scoreboard HUD and extra tools running over captured game feeds using the OpenCV video processing API. Client (OBS Live) Server Ar

Dec 5, 2022
Client-server-golang-sqs - Client Server with SQS and golang

Client Server with SQS and golang Multi-threaded client-server demo with Go What

Feb 14, 2022
A Golang localhost TLS Server for testing Mutual Authentication (A.K.A Client-Side Authentication)

goMutualAuthServer goMutualAuthServer implements a localhost TLS server in Golang, which can be used to perform Mutual Authentication (A.K.A Client-Si

Dec 23, 2021
A cross platform desktop service that watches custom folders for file changes and updates the corresponding database in Notion.

A cross platform desktop service that watches custom folders for file changes and updates the corresponding database in Notion. Perfect for tracking reading lists

Mar 12, 2022
This is a single-instance streaming server with chat.

Table of Contents AlbertoBroadcast stream server Build requirements Older Go Versions Compile and install Docker build Building the Container Running

Dec 24, 2021
A library to construct etcd/clientv3 connection params from environment variables

etcd-client-from-env This library reads environment variables and returns a clientv3.Config. It makes it easy to write tools against etcd that give th

Jan 17, 2022
A Go client implementing a client-side distributed consumer group client for Amazon Kinesis.
A Go client implementing a client-side distributed consumer group client for Amazon Kinesis.

Kinesumer is a Go client implementing a client-side distributed consumer group client for Amazon Kinesis.

Jan 5, 2023
Clusterpedia-client - clusterpedia-client supports the use of native client-go mode to call the clusterpedia API

clusterpedia-client supports the use of native client-go mode to call the cluste

Jan 7, 2022
Client-go - Clusterpedia-client supports the use of native client-go mode to call the clusterpedia API

clusterpedia-client supports the use of native client-go mode to call the cluste

Dec 5, 2022
Simple AWS utilities packaged as a standalone binary

AWS Utils This repository contains a simple CLI utility with a number of useful sub-commands implemented for working with AWS Installation If you the

Oct 11, 2022
A small command line tool for testing grok patterns on file contents.

grogg A small command line tool for testing grok patterns on file contents. It uses the vjeantet/grok library for parsing and pterm for some extra glo

Feb 5, 2022