elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.92k stars 24.73k forks source link

SDK s3 client outgoing http connections should allow configuring TCP KeepAlive #101898

Open ywangd opened 11 months ago

ywangd commented 11 months ago

The AWS SDK s3 client defaults to not use TCP KeepAlive. Though the client has default read timeout of 50 seconds, TCP KeepAlive is essential for making sure that the other end of a connection still exists. We should allow it to be configured as part of client settings.

elasticsearchmachine commented 11 months ago

Pinging @elastic/es-distributed (Team:Distributed)

DaveCTurner commented 11 months ago

IMO by default TCP keepalives should be enabled in this context, RFC1122 be damned.

kingherc commented 11 months ago

Just out of curiosity, I searched a bit RFC1122 and it says:

If keep-alives are included, the application MUST be able to turn them on or off for each TCP connection, and they MUST default to off.

Not that it matters much, but I was wondering why they were off in the first place.

DaveCTurner commented 11 months ago

AIUI in October 1989 the extra load presented by keepalives (on both network and host CPU) was a significant concern. Things have moved on since then.