Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Timeouts, Valid Client Connections #4301

Merged
merged 17 commits into from
Feb 2, 2021

Conversation

ChristopherDavenport
Copy link
Member

No description provided.

@@ -226,7 +216,8 @@ object EmberClientBuilder {
val acgFixedThreadPoolSize: Int = 100
val chunkSize: Int = 32 * 1024
val maxResponseHeaderSize: Int = 4096
val timeout: Duration = 60.seconds
val idleReadTime = org.http4s.client.defaults.RequestTimeout
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bringing attention to what these values should be.

Copy link

@RaasAhsan RaasAhsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the idleTimeout need to be applied to the response write phase as well?

case Right((request, response)) => send(socket)(Some(request), response)
case Left(err) =>
Stream
.unfoldLoopEval(reachedEndError(socket))(s =>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super cool

@@ -40,40 +40,12 @@ final class EmberClientBuilder[F[_]: Concurrent: Timer: ContextShift] private (
private val logger: Logger[F],
val chunkSize: Int,
val maxResponseHeaderSize: Int,
private val idleConnectionTime: Duration,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've never been consistent about what's a public val on a builder and what isn't.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have not. We'd need to be consistent in our configurations. I just worry that I still have my timeouts wrong and wanted to give myself wiggle room in case I screwed up.

Comment on lines +176 to +177
idleConnectionTime,
timeout,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mind some named arguments here. These are both durations or finite durations, right?

@@ -156,6 +156,7 @@ final class EmberServerBuilder[F[_]: Concurrent: Timer: ContextShift] private (
)
_ <- Resource.make(Applicative[F].unit)(_ => shutdown.await)
_ <- Resource.liftF(ready.get.rethrow)
_ <- Resource.liftF(logger.info(s"Ember-Server service bound to address: $bindAddress"))
Copy link

@RaasAhsan RaasAhsan Feb 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blaze printed out a pretty crazy banner, do we want to do something like that in Ember also?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vote yes. I did it as a joke, and people absolutely loved it. Like, some of the most positive feedback we've ever gotten.

THE PEOPLE DEMAND THEIR FIGLETS.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Unlike the potential deadlock I fretted about above, I don't want to block this on a figlet.)

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few unresolved nits, but I'm satisfied that this is forward progress in its current state.

rossabaker added a commit that referenced this pull request Feb 2, 2021
@rossabaker rossabaker merged commit 20fa57e into http4s:series/0.21 Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants