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

Document default connection-pool-size for REST Clients and raise default pool size to 50 for Quarkus REST #45148

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

weltonrodrigo
Copy link
Contributor

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Unlike its position in the tree could indicate, I think this config is used for both the classic and the reactive REST Clients. So we would need to make sure this change is correct for both of them.

@weltonrodrigo
Copy link
Contributor Author

Unlike its position in the tree could indicate, I think this config is used for both the classic and the reactive REST Clients. So we would need to make sure this change is correct for both of them.

I managed to find that the default for the resteasty-reactive was 20:

I managed to confirm that indeed the client is created with 20 for older quakus versions when the using

  <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-rest-client-reactive</artifactId>
     <version>3.6.3</version>
  </dependency>

But I must admit I'm quite lost here about what do you mean by both classic and reactive REST clients. Isn't the reactive client the default and isn't the reactive the client used when following this guide https://quarkus.io/guides/rest-client ?

If you can gimme a pom that will use the classic rest I can check what is the actual value.

@gsmet
Copy link
Member

gsmet commented Feb 6, 2025

Sorry, I forgot about this one. My point is that while you are keeping the same default for RESTEasy Classic, you are actually changing the default for RESTEasy Reactive - given they use the same config (except if I'm mistaken?).

I'm fine having the same default but we need to make sure it makes sense.

50 looks like a lot to me and I would favor 20 for both but I don't know :)

@gsmet
Copy link
Member

gsmet commented Feb 14, 2025

@weltonrodrigo I thought about it a bit more and I think you're right that we should align with 50 as the default value. I tried to be explicit in the commit comment:

The default REST Client connection pool size for RESTEasy Classic was
50, but the one for Quarkus REST is 20.
Given most of the time, the limiting factor will be the responsiveness of the
server, not the speed of the implementation, I think we should be
conservative and keep the same values.

@geoand do you agree with this analysis?

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

Yeah, that makes sense

@geoand geoand added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 14, 2025

This comment has been minimized.

Copy link

github-actions bot commented Feb 14, 2025

🎊 PR Preview aa638a1 has been successfully built and deployed to https://quarkus-pr-main-45148-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

This comment has been minimized.

@weltonrodrigo
Copy link
Contributor Author

@weltonrodrigo I thought about it a bit more and I think you're right that we should align with 50 as the default value. I tried to be explicit in the commit comment:

I believe you'll find this funny, but I actually though @WithDefault("50") would just document this value as being 50 in the generated documentation pages. I now understand that this actually sets the value to 50 when no user provided config is present.

This is funny because I was both wrong and right. Wrong because I wrongly interpreted the code and misunderstood the value to be 50 and right because it seems it actually should be 50.

And now this thread makes so much sense to me now.

Comment from Guillaume:

The default REST Client connection pool size for RESTEasy Classic was
50, but the one for Quarkus REST is 20.
Given most of the time, the limit factor will be the responsiveness of the
server, not the speed of the implementation, I think we should be
conservative and keep the same values.

Co-authored-by: Guillaume Smet <[email protected]>
@gsmet
Copy link
Member

gsmet commented Feb 22, 2025

I believe you'll find this funny, but I actually though @WithDefault("50") would just document this value as being 50 in the generated documentation pages. I now understand that this actually sets the value to 50 when no user provided config is present.

This is actually what is required for the test to pass so I switched to an annotation to only document the behavior.

Still it's better to have everything aligned between RESTEasy and Quarkus REST.

I wonder if we should go through the other properties and check how aligned they are and document their values. It's a bit hard to figure out the defaults atm.

Copy link

quarkus-bot bot commented Feb 22, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 56c2c32.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

quarkus-bot bot commented Feb 22, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 56c2c32.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 21

📦 extensions/smallrye-reactive-messaging-kafka/deployment

io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing.KafkaDevServicesContinuousTestingWorkingAppPropsTestCase.testContinuousTestingScenario3 - History

  • io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.redis.deployment.client.DevServicesRedisProcessor\#startRedisContainers threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image docker.io/redis:7 at io.quarkus.redis.deployment.client.DevServicesRedisProcessor.startRedisContainers(DevServicesRedisProcessor.java:124) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856) - java.lang.RuntimeException
java.lang.RuntimeException: 
io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.redis.deployment.client.DevServicesRedisProcessor#startRedisContainers threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image docker.io/redis:7
	at io.quarkus.redis.deployment.client.DevServicesRedisProcessor.startRedisContainers(DevServicesRedisProcessor.java:124)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:255)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)

@gsmet gsmet merged commit ee7bc6b into quarkusio:main Feb 26, 2025
37 checks passed
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 26, 2025
@quarkus-bot quarkus-bot bot added this to the 3.21 - main milestone Feb 26, 2025
@gsmet gsmet changed the title Document default connection-pool-size for rest-client Document default connection-pool-size for REST Clients and raise default pool size to 50 for Quarkus REST Feb 27, 2025
@gsmet gsmet modified the milestones: 3.21 - main, 3.19.2 Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants