site-logo

JAWS PANKRATION 2024

Project "Instance Lottery"

Lv300

Lv300

2024/8/25 05:20 (JST)

セッション情報

For systems that are sensitive to communication latency with the database, the latency caused by inter-AZ communication can be a problem.

In such cases, it will be an option to allocate resources to a single AZ to avoid the latency, at the expense of availability.

However, one thing to note here is that an AZ consists of multiple data centers, so the distance between each EC2 instance and RDS DB instance may vary even within the same AS, which may affect system performance.

This session aims to uncover trends in intra-AZ communication based on actual measurements and provide insights for designing latency-sensitive systems.

Hiroshi  Hayakawa

Hiroshi Hayakawa

- AWS Community Builders -

- AWS Top Engineers(APN) -

- AWS Ambassadors(APN) -

- AWS All Certified Engineers(APN) -



セッションカテゴリ
Computing


関連AWSサービス
EC2


セッションアーカイブ

セッションサマリ(by Amazon Bedrock)
    The presenter, Hiroshi Hayakawa, discusses an experiment called "Instance Lottery" or "Instance Gacha" to investigate latency differences between EC2 instances and RDS endpoints. The motivation came from a social media post suggesting that some instances have significantly higher latency, potentially causing application issues. The experiment involved launching numerous EC2 instances (around 12,000) across four Availability Zones in Oregon and measuring their latency to an RDS instance. The measurement tool, "DB Ping," was created using Python's psycopg3 library. It measured round-trip time (RTT) and turn-around time (TAT) every second for 60 iterations per instance. Key findings: 1. Latency was generally low and stable, with most instances performing well enough for typical applications. 2. Cross-AZ communication showed higher latency spikes (up to 3ms) compared to same-AZ communication. 3. Instance types didn't significantly affect latency spike occurrence rates. 4. T4g.micro instances appeared to have larger spikes, but this may be due to a larger sample size. The presenter concluded that actively replacing instances based on latency might not be necessary for most applications. However, latency-sensitive applications should consider same-AZ deployments or other optimizations. As an aside, the presenter mentioned that AWS Config costs were unexpectedly high, about 60 times more than the EC2 instance costs for this experiment.

©JAWS-UG (AWS User Group - Japan). All rights reserved.