open-consul/website/pages/commands/rtt.mdx
Jasmine W 8ae3332165
docs: update structure (#8506)
- moved and renamed files/folders based on new structure
- updated docs navigation based on new structure
- moved CLI to top nav (created commands.jsx and commands-navigation.js)
- updated and added redirects
- updating to be consistent with standalone categories
- changing "overview" link in top nav to lead to where intro was moved (docs/intro)
- adding redirects for intro content
- deleting old intro folders
- format all data/navigation files
- deleting old commands folder
- reverting changes to glossary page
- adjust intro navigation for removal of 'vs' paths
- add helm page redirect
- fix more redirects
- add a missing redirect
- fix broken anchor links and formatting mistakes
- deleted duplicate section, added redirect, changed link
- removed duplicate glossary page
2020-09-01 11:14:13 -04:00

60 lines
1.9 KiB
Plaintext

---
layout: commands
page_title: 'Commands: RTT'
sidebar_title: rtt
description: |
The rtt command estimates the network round trip time between two nodes.
---
# Consul RTT
Command: `consul rtt`
The `rtt` command estimates the network round trip time between two nodes using
Consul's network coordinate model of the cluster.
See the [Network Coordinates](/docs/internals/coordinates) internals guide
for more information on how these coordinates are computed.
## Usage
Usage: `consul rtt [options] node1 [node2]`
At least one node name is required. If the second node name isn't given, it
is set to the agent's node name. These are the node names as known to
Consul as the `consul members` command would show, not IP addresses.
#### API Options
@include 'http_api_options_client.mdx'
#### Command Options
- `-wan` - Instructs the command to use WAN coordinates instead of LAN
coordinates. By default, the two nodes are assumed to be nodes in the local
datacenter and the LAN coordinates are used. If the -wan option is given,
then the WAN coordinates are used, and the node names must be suffixed by a period
and the datacenter (eg. "myserver.dc1"). It is not possible to measure between
LAN coordinates and WAN coordinates, so both nodes must be in the same area.
The following environment variables control accessing the HTTP server via SSL:
- `CONSUL_HTTP_SSL` Set this to enable SSL
- `CONSUL_HTTP_SSL_VERIFY` Set this to disable certificate checking (not recommended)
## Output
If coordinates are available, the command will print the estimated round trip
time between the given nodes:
```shell-session
$ consul rtt n1 n2
Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates)
$ consul rtt n2 # Running from n1
Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates)
$ consul rtt -wan n1.dc1 n2.dc2
Estimated n1.dc1 <-> n2.dc2 rtt: 1.275 ms (using WAN coordinates)
```