Skip to content

Upgrade to 2.0.0 did not fix latency issues #1082

@karthich

Description

@karthich

Describe the bug

Hey all,

I updated the package to 2.0.0 this past week and observed that this doesnt seem to have solved the latency issues.

I have attached results in the current behavior section. These are connections to an RDS postgresql database with IAM authentication enabled.

Expected Behavior

aws-advanced-python-wrapper should exhibit the same latencies for 1.1.1 as it does for 2.0.0

What plugins are used? What other connection properties were set?

IamAuthPlugin, DefaultPlugin

Current Behavior

I have attached the results of database connection, query and execution times of the aws-advanced-python-wrapper for the same service (in test) where the package version was 1.1.1, 1.4.0 and 2.0.0. The graphs contain the average, 50th percentile and the 90th percentile of latency times (all in ms). I have drawn lines on the timescale to denote when the package versions were updated and you can see a clear demarcation in latency times for various spans within the codebase after the versions changed.

Span name = aws_advanced_python_wrapper.wrapper

Image

Clear spike in latency in both 1.4.0 and 2.0.0

Span name = IamAuthPlugin

Image

Same as above

Span name = "fetch authentication token"

Image

2.0.0 fetch authentication token span is much larger than 1.1.1 and 1.4.0

Span name = "DefaultPlugin"

Image

DefaultPlugin seems to be same (with some spikes) between 1.1.1 and 1.4.0 but 2.0.0 is consistently higher.

I am now wondering if there are other http calls being made underneath the hood that I am not thinking of that might be causing these latencies? Do you have any suggestions on how I can get more telemetry (maybe telemetry of boto calls?).

Reproduction Steps

  1. Create an RDS Postgres database with an IAM authentication user
  2. Pass in IAM_REGION as an explicit parameter.
  3. Measure the database connection latencies.
    You will see latencies are spiking between 1.1.1 and 2.0.0 even after IAM_REGION is passed in as a parameter.

Possible Solution

No response

Additional Information/Context

No response

The AWS Advanced Python Wrapper version used

2.0.0

python version used

3.13.7

Operating System and version

debian:trixie-slim

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions