Conversation
This eliminates TCP handshakes, TCP slow start, and potentially TLS negotiation for subsequent requests. The `max_idle_pool_size` is just a starter value. I normally parse it from the URL the way the crystal-lang/crystal-db shard does[1], but I think it makes sense to discuss that as a feature first. [1] https://github.com/crystal-lang/crystal-db/blob/eaddae7d71d52536453ea2d94777854f1b057f83/src/db/driver.cr#L31-L40
|
thanks for this @jgaskins i think we'd need to implement retries and make sure to catch errors and raise |
|
@stakach I thought |
|
Looks like that was added recently, should drop in crystal 1.2 crystal-lang/crystal#11088 I've been having to deal with this manually by detecting closed sockets and creating new HTTP clients as required |
|
Oh interesting. I didn’t realize that hadn’t been implemented yet. I could’ve sworn I’d seen connections get closed and Ironically, I forgot to set |
This eliminates TCP handshakes, TCP slow start, and potentially TLS negotiation for subsequent requests.
The
max_idle_pool_sizeis just a starter value. I normally parse it from the URL the way thecrystal-lang/crystal-dbshard does, but I think it makes sense to discuss that as a feature first.