Skip to content

Alternator traffic optimization #112

Open
1 of 4 issues completed
Open
Epic
1 of 4 issues completed
@dkropachev

Description

@dkropachev

AWS SDK injects lot's of headers into the code, that are not used by alternator:

User-Agent: aws-sdk-go-v2/1.36.2 ua/2.1 os/linux lang/go#1.24.0 md/GOOS#linux md/GOARCH#amd64 api/dynamodb#1.40.2 m/E
Content-Length: 73
Accept-Encoding: identity
Amz-Sdk-Invocation-Id: fd6049d4-471a-4a99-afee-57676ef5fe4e
Amz-Sdk-Request: attempt=1; max=3
Authorization: AWS4-HMAC-SHA256 Credential=whatever/20250303/default-alb-region/dynamodb/aws4_request, SignedHeaders=accept-encoding;amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date;x-amz-target, Signature=d05a4159d91d650f74a15824724aa4315f49bebd19ef23c2347fb420bcda5680
Content-Type: application/x-amz-json-1.0
X-Amz-Date: 20250303T124139Z
X-Amz-Target: DynamoDB_20120810.PutItem

It is possible to inject small peace of code that will be executed right before request is sent to remove unnecessary headers, which will lead to great traffic reduction that coming out of the client.

List of headers needed for clients with no credentials (or with cert auth): "Host", "X-Amz-Target", "Content-Length", "Accept-Encoding"
List of headers needed for clients with credentials: "Host", "X-Amz-Target", "Content-Length", "Accept-Encoding", "Authorization", "X-Amz-Date"

Sub-issues

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions