A highly configurable microservices benchmark application generator designed specifically for researchers. Hexagon can generate benchmark microservices applications of virtually unlimited scale and interaction patterns without requiring application rebuilds.
Follow this guide to test out Hexagon. This guide will walk you through basic tasks for intallation and manifest generation.
Dependency | Version | Description |
---|---|---|
Go | 1.22 | Should also work with 1.21, 1.20 |
kind | 1.27+ | Should work with any standard Kubernetes cluster |
Currently precompiled binary is not available but will be ready in the future. For now, you need to compile the CLI after cloning this repository.
go build -o ./hexctl cmd/hexctl/main.go
You can skip this task if you already have a working cluster.
kind create cluster --name hexagon-cluster
Generate manifest with the CLI built ealier. This will generate manifests for example application that emulates Online Boutique, using the example configuration available in example/config/onlineboutique. For more details on configuration values, please refer to the documentaion.
./hexctl generate -f example/config/onlineboutique/ -o example/manifest/
-f
specifies the directory for the hexagon configuration files
-o
specifies the directory for the output Kubernetes manifets
Create namespace and apply the manifests, nothing special.
# create namespace
kubectl create namespace hexagon
# hexagon generates manifests for `hexagon` namespace by default
kubectl apply -f example/manifest/
There is a ready to use K6 loadgenerator deployment for the emulated application available in example/loadgenerator
.
Apply it to see the generated application handling traffic.
kubectl apply -n hexagon -f example/loadgenerator/manifests.yaml
Currently, Hexagon cannot generate UIs so watch logs to see the application running.
For example, Watch the logs for frontend
.
kubectl logs -n hexagon --selector app=frontend -f
Simply delete the kind cluster if you created one.
kind delete cluster --name hexagon-cluster
see terminologies.
Hexagon allows configuration of following features for generated application
Hexagon can configure APIs that each service expose and invoke using yaml. The types of APIs include:
Synchronous protocols such as:
- HTTP REST
- gRPC
Asynchrounous protocols such as:
- Kafka
Database connections such as:
- MongoDB
- Redis
Hexagon supports the configuration of internal workload for each service. Using this feature, Hexagon can simulate resources intensive tasks performed by each service. Currently CPU intesive workload is supported.
Using the cli Hexagon can generate kubernetes manifests files from the configuration of each service. The generated manifests include resources such as:
- Deployment
- Service
- ConfigMap
Deployment can also configured with number of replicas for the service, resource limits and requests, and extra environmental variables.
- service unit: service unit is the primary container image that can be used by the stateless services.
- hexctl: hexctl is the cli program that can validate the configuration files and generate kubernetes deployment manifests for the configured application.
see internals.