aws / aws/aws-sdk-java-v2

AWS Java 2.x SDK (sync vs async) Client Documentation

Offen
#4,698 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
documentation p2
Vorherrschende Sprache
Java
Sterne
2.6k
Forks
1k
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
51

Beschreibung

### Describe the issue

The documenation [here](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/http-configuration.html) seems very confusing.

The AWS Java 2.x SDK offers many different http client alternatives. Two of which are the:

- Apache-based sync HTTP client
- AWS CRT-based async HTTP client

To help me understand the difference between the Sync and Async, I was trying to understand the differences described in the AWS documentation, as linked above.

When browsing their recommendations as to which to use, I found the following very peculiar:

> The Apache-based sync HTTP client is recommended for "low latency over high throughput", while the AWS CRT-based async HTTP client is recommended for "high throughput over low latency".

How on earth could the Apache-based sync HTTP client have a lower latency than one of the Async HTTP clients? I would expect the latency to be based on network latency and for that it's completely irrelevant which client (whether sync or async) you use.

Also, how could an Async client have a higher throughput than a sync HTTP client, that also doesn't make sense to me? I would expect the opposite because the sync client will busy wait until the response is available, while the async will go run off do something else in the meantime, and therefore might not be ready to handle the response right when it arrives.

I've also asked this [on stackoverflow](https://stackoverflow.com/questions/77280280/understanding-aws-sdk-java-2-x-async-vs-sync-http-clients), and I haven't any responses to my question yet.

### Links

https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/http-configuration.html

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der verlinkten AWS SDK Java-Seite zur HTTP-Konfiguration und überprüfe die Formulierung rund um die Apache-basierten synchronen und AWS CRT-basierten asynchronen Clients. Vergleiche die Empfehlungen zu Latenz und Durchsatz mit den Fragen des Issues; die Arbeit ist abgeschlossen, wenn die Dokumentation klar erklärt, was diese Empfehlungen bedeuten und warum sich die Client-Auswahl unterscheidet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, java
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.