Getting Started
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Previews
Samples

Measuring system throughput using Amazon SQS

The Particular throughput tool can be installed locally and run against a production system to discover the throughput of each endpoint in a system over a period of time.

This article details how to collect endpoint and throughput data when the system uses the Amazon SQS transport. Refer to the throughput counter main page for information how to install/uninstall the tool or for other data collection options.

Running the tool

Collecting metrics for SQS relies upon AWSSDK.SQS to discover queue names and AWSSDK.CloudWatch to gather per-queue metrics.

Authentication to AWS requires a AWS credentials profile, or credentials can be created from the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, if both are not empty. The tool uses default constructors for the SQS and CloudWatch clients and follows the credential and profile resolution rules determined by the AWS SDK.

The AWS region can be specified either by command-line parameter or by the AWS_REGION environment variable.

Execute the tool as shown in this example:

throughput-counter sqs

The tool will fetch all queue names, query CloudWatch for metrics for each queue, and then generate the report file.

Unlike ServiceControl, using SQS and CloudWatch metrics allows the tool to capture the last 30 days worth of data at once, which means that the report will be generated without delay. Although the tool collects 30 days worth of data, only the highest daily throughput is included in the report.

Options

OptionDescription
--profileThe name of a local AWS credentials profile. If not included, credentials can be read from the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.
--regionThe AWS region to use when accessing AWS services. If not provided, the default profile value or AWS_REGION environment variable will be used.
--prefixReport only on queues that begin with a specific prefix. This is commonly used when one AWS account must contain queues for multiple projects or multiple environments.

Example: --prefix "prod-"
--queueNameMasksMasks sensitive information in the generated report. See masking private data.
--customerNameSets the customer name. If not provided, the tool will prompt for the information.

Example: --customerName "Particular Software"
--unattendedWill not prompt for user input, so that the tool can be used from environments such as a continuous integration system.

Related Articles


Last modified