It is used in example topologies (example_tree_4.yaml etc.,) in yaml_crds of TAAC repo.
This directory holds the "mock-service" component. It is a relatively simple HTTP server which follows instructions from a YAML file and exposes Prometheus metrics.
- Include the entire topology YAML in
/etc/config/service-graph.yaml - Set the environment variable,
SERVICE_NAME, to the name of the service from the topology YAML that this service should emulate
Captures the following metrics for a Prometheus endpoint:
service_incoming_requests_total- a counter of requests received by this serviceservice_outgoing_requests_total- a counter of requests sent to other servicesservice_outgoing_request_size- a histogram of sizes of requests sent to other servicesservice_request_duration_seconds- a histogram of durations from "request received" to "response sent"service_response_size- a histogram of sizes of responses sent from this service
Running on a GKE cluster with a limit of 1 vCPU and 3.75 gigabytes of memory, and logging set to INFO, this service can reach a maximum QPS of 12,000.