TSA

Traffic Analytics Service (TSA) is a Kaa service that listens to traffic report events for tenants’ endpoints over the [09/ELCE][09/ELCE] protocol and indexes that data in Elasticsearch.

Each traffic report event is indexed to the index with the corresponding tenant ID in its name.

Index mapping looks like this:

{
  "tenantId": {
    "type": "keyword"
  },
  "appName": {
    "type": "keyword"
  },
  "endpointId": {
    "type": "keyword"
  },
  "replicaId": {
    "type": "keyword"
  },
  "receivedPayload": {
    "type": "long"
  },
  "sentPayload": {
    "type": "long"
  },
  "timeFrom": {
    "type": "date",
    "format": "epoch_millis||epoch_second"
  },
  "timeTo": {
    "type": "date",
    "format": "epoch_millis||epoch_second"
  }
}

Interfaces

TSA supports a number of interfaces to perform its functional role. The key supported interfaces are summarized in the following diagram.

TSA interfaces diagram

For inter-service communication, Kaa services mainly use REST APIs and messaging protocols that run over NATS messaging system.

Endpoint traffic reports

TSA listens to 09/ELCE endpoint traffic report events and stores them to Open Distro.

Management interface

TSA exposes an HTTP-based management interface with the following endpoints:

  • GET /health returns 200 OK if the service is up and running properly, and 500 Internal Server Error otherwise. In case of errors, the response payload contains their human-redable descriptions. This endpoint can be used by Kubernetes for liveness and readiness probing.
  • GET /metrics provides service metrics in Prometheus text-based format.