Generated by GPT-5-mini| tsung | |
|---|---|
| Name | tsung |
| Developer | Nicolas Niclausse |
| Initial release | 2000s |
| Programming language | Erlang |
| Operating system | Cross-platform (Unix-like) |
| License | GPLv2 |
tsung Tsung is an open-source distributed load testing tool designed for benchmarking and stress testing networked services. It originated to exercise high-concurrency servers and supports protocols commonly used by Internet services, allowing comparison between implementations such as Nginx, Apache HTTP Server, Lighttpd, Microsoft IIS, and HAProxy. Tsung integrates with ecosystem tools like Erlang/OTP, Munin, Graphite, InfluxDB, and Grafana for metrics collection and visualization.
Tsung is implemented in Erlang/OTP and leverages the language's concurrency model to simulate thousands of virtual users across multiple load generators. The project targets protocols including HTTP, WebSocket, XMPP, PostgreSQL, and MySQL, enabling performance assessment of systems like Django, Ruby on Rails, Node.js, Tomcat, and Jetty. Tsung can run distributed tests across many hosts, coordinating through central configuration to compare backends such as Redis, Memcached, MongoDB, and Cassandra under stress. Its reported scalability made it a choice for organizations benchmarking stacks involving Amazon Web Services, Google Cloud Platform, Microsoft Azure, and private datacenters.
Development began in the mid-2000s by French engineer Nicolas Niclausse and evolved with contributions from the Erlang/OTP community. Early releases focused on XMPP and HTTP testing; subsequent versions expanded protocol support to include database drivers for PostgreSQL and MySQL and real-time protocols like WebSocket. The project intersected with trends driven by the rise of RESTful API architectures, AJAX applications, and event-driven servers such as Nginx and Node.js. Over time, tsung's roadmap reflected shifts toward cloud-native deployment patterns involving Docker, Kubernetes, and continuous integration systems like Jenkins and GitLab CI. Contributions came from practitioners at academic institutions and companies performing capacity planning for services like Flickr, Twitter, and Facebook-scale traffic.
Tsung's architecture centers on a master process controlling multiple distributed client processes implemented with Erlang/OTP supervisors and processes. Test scenarios are declared in XML and coordinate virtual user sessions interacting with target endpoints like RESTful APIs served by Express.js, Spring Boot, or ASP.NET Core. The master collects latency and throughput metrics and aggregates them for exporters compatible with Graphite, InfluxDB, and Prometheus through intermediary collectors such as StatsD or Telegraf. Tsung uses efficient network I/O via Erlang's lightweight processes to simulate tens or hundreds of thousands of simultaneous connections, making it appropriate for assessing load balancers like HAProxy and reverse proxies such as Varnish Cache.
Tsung provides session recording and playback, parameterization, think-time modeling, and distributed load generation across multiple hosts. It can simulate complex user behaviors against services like authentication flows in OAuth 2.0-based systems, multipart uploads to Amazon S3, or message exchange patterns used by XMPP servers such as ejabberd and Openfire. Key capabilities include detailed latency histograms, request/response logging, connection reuse, and support for secure transports used by TLS as implemented in OpenSSL. Tsung's XML scenarios allow substitution of variables drawn from CSV data for testing services like WordPress or Drupal under realistic user mixes. The tool integrates with monitoring stacks including Prometheus + Grafana or Graphite + Munin for correlation of application metrics with load patterns.
Tsung deployments commonly employ a central controller and multiple agents running on Linux distributions such as Ubuntu, Debian, and CentOS to generate distributed load. Configuration is specified in XML files naming target hosts, ports, virtual user scenarios, and reporting backends; orchestration is often performed with Ansible, Terraform, or Docker Compose to provision generators and targets. In cloud environments, engineers place generators in separate availability zones on providers like Amazon EC2, Google Compute Engine, or Microsoft Azure Virtual Machines to avoid network bottlenecks and to validate edge routing through Cloudflare or Akamai. For CI pipelines, tsung runs are scheduled and artifacts archived by Jenkins, Travis CI, or GitHub Actions to regress performance across commits.
Organizations use tsung for capacity planning, regression testing, and validating service level objectives (SLOs) for platforms such as OpenStack, Kubernetes, and bespoke microservices architectures. It has been used to benchmark HTTP APIs implemented with Flask, FastAPI, and Gin (web framework) as well as database-backed applications using PostgreSQL, MySQL, or Cassandra. Comparative studies have assessed web servers like Nginx versus Apache HTTP Server under keep-alive workloads, and message brokers such as RabbitMQ versus Apache Kafka for pub/sub scenarios. Performance engineers combine tsung output with APM tools like New Relic, Datadog, or Elastic APM to identify bottlenecks and validate autoscaling rules in platforms such as Kubernetes Horizontal Pod Autoscaler.
Tsung is distributed under the GNU General Public License version 2 (GPLv2) and maintained by contributors from the Erlang ecosystem. Community support appears on mailing lists, issue trackers hosted on platforms like GitHub and GitLab, and discussion forums frequented by operators from companies such as Mozilla, Spotify, and research groups at institutions like MIT and ETH Zurich. Third-party plugins and integrations have been developed to link tsung with modern observability tools such as OpenTelemetry and exporters used by Prometheus. The project's open-source license permits modification and redistribution under copyleft terms, fostering forks and adaptations for specialized benchmarking needs.
Category:Performance testing tools Category:Free software programmed in Erlang