Effective Connection Type

May 20, 2023

The Effective Connection Type (ECT) is an estimate of the network conditions between the client and the server. The ECT is determined by the client’s network environment and the available network characteristics.

The ECT is an important metric for web developers to consider when optimizing their site’s performance. It is used by the browser to determine the appropriate response to return to the user in order to provide a good user experience.

How ECT is Determined

The ECT is determined by a combination of the network’s actual throughput, round trip time (RTT), and packet loss rate. These factors are used to determine the ECT metric, which is then used to determine the appropriate response to return to the user.

Throughput

Throughput is a measure of how much data can be transmitted over a network in a particular amount of time. The higher the throughput, the faster data can be transmitted. Throughput is measured in bits per second (bps).

Round Trip Time

Round trip time (RTT) is a measure of the time it takes for a packet to travel from the client to the server and back again. RTT is measured in milliseconds (ms).

Packet Loss Rate

Packet loss rate is a measure of how many packets are lost during transmission. Packet loss is caused by network congestion, which can be caused by a variety of factors such as high network traffic, long distances between endpoints, and network equipment failures.

ECT Metric

The ECT metric is calculated based on the throughput, RTT, and packet loss rate. There are four possible ECT values:

  • Slow 2G (50 Kbps – 150 Kbps, RTT > 500 ms, packet loss rate > 10%)
  • 2G (50 Kbps – 250 Kbps, RTT > 300 ms, packet loss rate > 10%)
  • 3G (150 Kbps – 2 Mbps, RTT > 100 ms, packet loss rate > 1%)
  • 4G (2 Mbps or more, RTT < 100 ms, packet loss rate < 1%)

These values are used by the browser to determine the appropriate response to return to the user. For example, if the user’s effective connection type is determined to be Slow 2G, the browser may return a simplified version of the website that is optimized for slower network speeds.

Importance of ECT

The ECT is an important metric for web developers to consider when optimizing their site’s performance. It helps ensure that users are receiving the appropriate content for their network conditions, improving the user experience.

In addition, the ECT can be used to optimize site performance for specific network conditions. For example, if a large number of users are accessing a site over a slow 2G connection, the developer may choose to optimize the site’s performance for that specific connection type.

ECT and User-Agent Strings

The ECT is determined by the client’s network environment, but it is also influenced by the user-agent string sent by the browser. The user-agent string includes information about the browser and device being used to access the site.

Some web developers have attempted to optimize their site’s performance based on the user-agent string, but this approach is not recommended. The user-agent string can be easily spoofed, leading to inaccurate ECT estimates.